diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 4ccf38eba7ac..7f0d3e8b0f6a 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -1387,7 +1387,7 @@ namespace std { if (thread_local_handlers) { return pathscale::set_unexpected(f); } - return ATOMIC_SWAP(&terminateHandler, f); + return ATOMIC_SWAP(&unexpectedHandler, f); } /** * Sets the function that is called to terminate the program.