-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxying certain [Serializable] classes produces proxy types that fail PEVerify test #367
Comments
I've been looking into this and there appears to be several questionable things going on here:
Fixing the reported issue likely implies that the whole |
Using Castle Core 4.2.1, proxying the following type (or
System.Security.Claims.ClaimsIdentity
, if you want a more realistic example) produces a proxy class with incorrect IL:When running PEVerify for the dynamically generated assembly, it complains about duplicate methods:
The mentioned methods belong to the generated proxy class
BadSerializableProxy
.Below you'll find the two methods as ILSpy decompiles them back to C#:
This error does not happen if either:
[Serializable]
ISerializable
interfaceGetObjectData
is not declaredvirtual
The text was updated successfully, but these errors were encountered: