- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
Add a test for control flow guard #65122
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
Conversation
Adds a test that compiles with CFG enabled and then re-runs itself to crash in various ways.
| @jakobbotsch looks like the Debug leg is failing with a RyuJIT assert  Also apparently in the CI the exit code of a process that was shut down by CFG is 57005 (0xDEAD) and not 0xC0000409 that I'm seeing locally ¯_(ツ)_/¯. | 
| 
 Forward sub is quite new and runs before any CFG related transformation, so I don't think it is related. Cc @AndyAyersMS 
 😄 | 
| 
 Forward Sub is calling a morph utility before morph has run, so presumably some precondition isn't satisfied. I'm not sure what that assert is trying to tell us but it looks like we can just remove it. @sandreenko if you get a chance -- can you explain the assert added to  | 
| 
 Hi Andy, the idea was the following: I wanted  | 
| @sandreenko thanks. | 
| @MichalStrehovsky see if AndyAyersMS@5658ec9 fixes your issue, if so you can fold it in here or I can PR separately. | 
We can fold these similar to how we fold ADDR(LCL).
| 
 Thank you! I folded it in. | 
| Now it's  | 
| I don't really need the mode where we compile debug-compiled CoreLib with RyuJIT optimizations so this is not a blocker (it's what I meant with "Maybe I shouldn't do that." above). Unless the failure looks interesting for the general "make sure this works for IL patterns generated by compilers other than Roslyn". It's not high pri from my side. | 
| Seems like this could come up more generally. The call to  | 
| The NativeAOT legs now look good! Thanks Andy! @jakobbotsch Could you review the JIT change too? While I 100% trust Andy's code, I don't want to merge something that didn't go through code review and I'm not qualified. | 
Adds a test that compiles with CFG enabled and then re-runs itself to crash in various ways.