On Tue, 16 Jun 2026, Pali Rohár wrote:

I think that any builds that have SEH disabled are unsupported -- not just
because of exceptions, longjmp also won't work reliably.

Martin had different opinion, that it should be supported. So I tried to
present something which could work for at least some specific cases.
Something which could work for use cases which Evgeny has.

longjmp is another topic, but it could be also fixed to not use SEH.
Even CRT DLLs expose a way how to use longjmp without SEH and without
stack unwinding.

Yes - or like I said before; we probably don't need to commit to continuously testing all possible combinations of it. But we shouldn't reject patches to fix it if someone wants to contribute such patches, and we can of course be helpful if someone points out when we've broke something that did before.

Regarding such configurations - I think it's entirely ok that not everything works 100% in such configurations, that's a tradeoff for the people using such configurations. Whether setjmp/longjmp works or not can be one such thing.

And regarding setjmp/longjmp, in setjmp.h we have ifdef checks for __SEH__ - if it is not defined, we attempt to do things in a way that doesn't require SEH. (On x86_64, it just passes NULL for the second parameter to _setjmp. On arm/aarch64, we use our own custom reimplementations of those functions instead.)

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to