This is an archive of the discontinued LLVM Phabricator instance.

[Windows SEH] Fix catch+return crash for Windows -EHa
ClosedPublic

Authored by pengfei on Mar 29 2023, 8:50 AM.

Details

Summary

This change also turns on -fasync-exceptions by default under -EHa
option due to the backend patch merged.

Diff Detail

Event Timeline

pengfei created this revision.Mar 29 2023, 8:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 8:50 AM
pengfei requested review of this revision.Mar 29 2023, 8:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 8:50 AM
pengfei added a comment.EditedMar 29 2023, 10:35 PM

I checked no difference in codegen between /EHa and /EHsc in MSVC https://godbolt.org/z/rcMaP6Wse. So it should be correct for clang as well.
We should land it ASAP since it fixes a crash case.

LuoYuanke accepted this revision.Mar 30 2023, 11:22 PM

LGTM, pls wait for 1 or 2 days in case there are comments from others

This revision is now accepted and ready to land.Mar 30 2023, 11:22 PM
This revision was automatically updated to reflect the committed changes.