This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][asan][win] Intercept exceptions for i686 MinGW
ClosedPublic

Authored by alvinhochun on Apr 22 2023, 6:31 AM.

Details

Summary

The i686-w64-windows-gnu target does not use SEH (which MSVC uses),
but DWARF-2 exception handling or possibly sjlj depending on the
toolchain build options. On this target we have to actually intercept
functions in libc++ and libunwind which handles throwing exceptions.
This fixes the TestCases/intercept-rethrow-exception.cpp test.

The x86_64-w64-windows-gnu target already works because it uses SEH
which is handled by intercepting RaiseException, so this change does not
affect x86_64.

Depends on D148990

Diff Detail

Event Timeline

alvinhochun created this revision.Apr 22 2023, 6:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 6:31 AM
alvinhochun requested review of this revision.Apr 22 2023, 6:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 6:32 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
mstorsjo accepted this revision.Apr 22 2023, 7:54 AM

LGTM, thanks!

This revision is now accepted and ready to land.Apr 22 2023, 7:54 AM
vitalybuka accepted this revision.Apr 28 2023, 10:02 AM
This revision was landed with ongoing or failed builds.May 4 2023, 7:41 AM
This revision was automatically updated to reflect the committed changes.