[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 19 12:20:46 PDT 2025


sivadeilra wrote:

My team is interested in fixing / completing the SEH support in LLVM, as well.  I think this PR is consistent with that, since it aligns LLVM's behavior with that of MSVC.

For an SEH exception that occurs within a function due to a CALL (such as a bogus indirect call), the IP should point to the beginning of the CALL instruction, so the IP2State tables should point to the correct region.

@namazso , I'd be happy to improve the state of things for SEH, as well as ensuring that this PR doesn't regress support for GNU's EH support on Windows.  If GNU's C++ EH support is based on SEH, then I think I will need to change this PR so that a CALL aligned to `.seh_startepilogue` always inserts a NOP call.  That's easy to do.  Do you have pointers to any info on GNU C++ exception dispatch?

https://github.com/llvm/llvm-project/pull/144745


More information about the llvm-commits mailing list