Skip to content

(0.51) Check Control Flow Guard on Windows #21279

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

a7ehuo
Copy link
Contributor

@a7ehuo a7ehuo commented Mar 5, 2025

cherry pick #21154


If Control Flow Guard (CFG) is enabled in Windows, set TR_NoResumableTrapHandler in the JIT.

If CFG is set, the JIT will not resume exception but instead it goes to the unexpected exception path error handling so that the diagnostic logs will be dumped.

This change relies on API GetProcessMitigationPolicy. Its minimum supported client version is Windows 8 and its minimum supported server version is Windows Server 2012.

Fixes: #19892

If Control Flow Guard (CFG) is enabled in Windows, set
TR_NoResumableTrapHandler in the JIT.

If CFG is set, the JIT will not resume exception but
instead it goes to the unexpected exception path error
handling so that the diagnostic logs will be dumped.

This change relies on API GetProcessMitigationPolicy.
Its minimum supported client version is Windows 8 and
its minimum supported server version is Windows Server 2012.

Fixes: eclipse-openj9#19892

Signed-off-by: Annabelle Huo <[email protected]>
@a7ehuo a7ehuo requested a review from dsouzai as a code owner March 5, 2025 13:41
@a7ehuo a7ehuo added the comp:jit label Mar 5, 2025
@a7ehuo
Copy link
Contributor Author

a7ehuo commented Mar 5, 2025

@0xdaryl @pshipton fyi

@0xdaryl 0xdaryl merged commit 8c56a80 into eclipse-openj9:v0.51.0-release Mar 5, 2025
2 checks passed
@0xdaryl 0xdaryl self-assigned this Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants