System.InvalidProgramException
gordan
Posts: 7
Hello,
I have used the SA version 6.0 for a while and now I have installed the latest version. After I have obfuscate my code code I start seeing very strange exception.
EDITED:
After obfuscation the folowing code throws System.InvalidProgramException - Common Language Runtime detected an invalid program.
It fails when it tries to get the IsCurrentlyExecuting property. When I remove the volatile keyword it works fine.
Could someone tell me what can be the problem? I'm need this very urgently since the release is already done and this was working with the older SA that I was having.
Thanks in advance.
I have used the SA version 6.0 for a while and now I have installed the latest version. After I have obfuscate my code code I start seeing very strange exception.
EDITED:
After obfuscation the folowing code throws System.InvalidProgramException - Common Language Runtime detected an invalid program.
public class Test() { private static volatile bool _IsCurrentlyExecuting; private static readonly object LockObject = new object(); public static bool IsCurrentlyExecuting { get { lock (LockObject) { return _IsCurrentlyExecuting; } } private set { lock (LockObject) { _IsCurrentlyExecuting = value; } } } }
It fails when it tries to get the IsCurrentlyExecuting property. When I remove the volatile keyword it works fine.
Could someone tell me what can be the problem? I'm need this very urgently since the release is already done and this was working with the older SA that I was having.
Thanks in advance.
Comments
In particular, I suspect Control Flow obfuscation, you may want to try a lower level there. Also, member refs proxy is probably going to violate the rules when it comes to volatile variables.