
Antony Polukhin wrote:
As long as we have no strict documentation or source codes of the component - it is UB to use it in async-signal-handler.
Yes, obviously. It's not clear though what do Linux users gain from the decision to keep their backend async-unsafe just because Windows is not strictly documented. And, FWIW, Windows is pretty resilient. Here for instance I crash in an APC that is called by the kernel, and it works, even though I can't see g() in the trace probably because Windows has handled the exception and rethrown it: #include <boost/stacktrace.hpp> #include <iostream> #include <signal.h> #include <windows.h> static void handler( int sig ) { boost::stacktrace::stacktrace st; std::cout << st << std::endl; _exit( 3 ); } VOID CALLBACK g( ULONG_PTR ) { std::cout << "g\n"; *(int*)0 = 0; } static void f() { std::cout << "f\n"; QueueUserAPC( g, GetCurrentThread(), 0 ); SleepEx( 1000, TRUE ); } int main() { signal( SIGSEGV, handler ); f(); }