[PATCH] D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1

Bo Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 14 01:01:16 PDT 2022


bowang added a comment.

Any updates on this patch? Would like to see it moving forward.

I was trying to use Google Breakpad with Clang. Breakpad is a crash handling library that generates a minidump at crash. The exception handler on Windows relies on SEH.

Breakpad works fine with MSVC. But when it is built with Clang, the exception code returned in `exinfo>ExceptionRecord->ExceptionCode` is incorrect. In my test program, an access to nullptr should trigger `EXCEPTION_ACCESS_VIOLATION` but what's returned is `EXCEPTION_BREAKPOINT`. I suspect it is due to Hardware Exception Handling in Clang.

I tried to add flag `-fasync-exceptions` but the problem stays the same.

I tried to add flag `-fseh-exceptions` but received an error `error: invalid exception model 'seh' for target 'x86_64-pc-windows-msvc19.0.24245'`

I'm not fully sure whether this patch can address my issue, but would appreciate if anyone could shed some light on this. Thanks in advance.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80344/new/

https://reviews.llvm.org/D80344



More information about the cfe-commits mailing list