The types of SEH aren't x86(-32) vs x64 but rather stack-based exception chaining
vs table-based exception handling. x86-32 is the only arch for which Windows
uses the former. 32-bit ARM would use what is called Win64SEH today, which
is a bit confusing so instead let's just rename it to be a bit more clear.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
490 ms | linux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp |
Event Timeline
FWIW, definite +1 from me, but I'll let the other reviewers comment as well. There's lots of other cases where things are named "Win64" when it comes to exception handling and unwind info management as well - are you going to clean up that naming as well? And does this imply you're planning on working on ARM unwinding? That'd be awesome.
My other naming suggestion would be MSVC_SEH_CSpecific, kind of inline with GNU_CXX[_SjLj], and the other would be MSVC_SEH_X86, I suppose. I'm assuming ARM and AArch64 all use a handler called __C_specific_handler?
Seems fine either way.
Personally, I think that table based makes more sense, since that is the defining characteristic of the xdata/pdata approach - there is a table that has that information and you look it up (similar to the zero-cost itanium model). This actually mirrors the GNU_CXX_SjLj better - that uses setjmp and longjmp as the mechanism.
I also think TableSEH is a bit clearer. And yea, I'll try to clean up other similar Win64 cases as I get around.