diff options
Diffstat (limited to 'src/support/utilities.h')
-rw-r--r-- | src/support/utilities.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/support/utilities.h b/src/support/utilities.h index a2fff7f0a..36f18fa4e 100644 --- a/src/support/utilities.h +++ b/src/support/utilities.h @@ -71,7 +71,10 @@ class Fatal { } WASM_NORETURN ~Fatal() { std::cerr << "\n"; - exit(1); + // Use _Exit here to avoid calling static destructors. This avoids deadlocks + // in (for example) the thread worker pool, where workers hold a lock while + // performing their work. + _Exit(1); } }; |