Skip to content

Commit 77793f4

Browse files
comment
1 parent eaec6c9 commit 77793f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libc/src/stdlib/exit.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ extern "C" [[gnu::weak]] void __cxa_thread_finalize();
2424

2525
// TODO: use recursive mutex to protect this routine.
2626
[[noreturn]] LLVM_LIBC_FUNCTION(void, exit, (int status)) {
27-
__cxa_thread_finalize();
27+
if (__cxa_thread_finalize)
28+
__cxa_thread_finalize();
2829
__cxa_finalize(nullptr);
2930
internal::exit(status);
3031
}

0 commit comments

Comments
 (0)