[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 20:22:11 PDT 2025
namazso wrote:
While I haven't checked how exactly this PR interacts with SEH, just here because https://github.com/llvm/llvm-project/issues/54922#issuecomment-2984928111 , I'd like to point out that https://clang.llvm.org/docs/MSVCCompatibility.html has the following snippet for SEH:
> Asynchronous Exceptions (SEH): Partial. Structured exceptions (__try / __except / __finally) mostly work on x86 and x64. LLVM does not model asynchronous exceptions, so it is currently impossible to catch an asynchronous exception generated in the same frame as the catching __try.
If this patch will remove the +1 offset from the beginning of the call instruction as well, then if that throws it will be caught in the same frame, which is "impossible" (not sure what the practical implications of this are). Call can throw when calling indirect from invalid memory. As it stands, this patch breaks this "functionality", as now these exceptions will be caught in the inner `__try`.
While MSVC never worked this way, this would not fix the whole SEH discrepancy, while effectively "removing" a feature.
https://github.com/llvm/llvm-project/pull/144745
More information about the llvm-commits
mailing list