SEH unwind info for function dividing by zero

Hi together,

I am currently using clang++ on windows with the target triple x86_64-pc-windows-gnu. If I write a small function that performs a division (which can result in a division by Zero) I would expect SEH unwind information for that function. As far as I know that information is crucial for unwinding the stack after e.g. a division by zero. The flag “-fasynchronous-unwind-tables” did not help.

Does this correspond to the note on stating the following?

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.

Is there a work-around helping the unwinding of the stack without SEH unwind info or am I missing something?

Kind regards

You specifically need non-call exceptions, which LLVM does not support. These provide a very nice programming model, but cause massive pain for the compiler because any instruction can have the side effect of flow control, which the compiler must model. The exception landing pad must be able to cope with jumps not just from function calls, but from any instruction that may trap (loads, stores, divides, any floating point instruction) and must handle register values that it needs not being live at that point. This is very difficult to support and so is not yet in LLVM, with the exception of a special case for dereferencing null pointers (which clang doesn’t use, though probably could on Windows if required, but which is used by some a Java implementation to generate Java NullPointerExceptions without explicit checks).