From bdcd73cd63fc5ec5b61fad6133f93b761073eddc Mon Sep 17 00:00:00 2001 From: losfair Date: Thu, 22 Aug 2019 17:45:52 -0700 Subject: [PATCH] Unblock signals in LLVM trap handler. --- lib/llvm-backend/src/platform/unix.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/llvm-backend/src/platform/unix.rs b/lib/llvm-backend/src/platform/unix.rs index 9e77c57d6..88ceb6854 100644 --- a/lib/llvm-backend/src/platform/unix.rs +++ b/lib/llvm-backend/src/platform/unix.rs @@ -69,6 +69,9 @@ extern "C" fn signal_trap_handler( _ucontext: *mut c_void, ) { unsafe { + if SigSet::all().thread_unblock().is_err() { + std::process::abort(); + } // Apparently, we can unwind from arbitary instructions, as long // as we don't need to catch the exception inside the function that // was interrupted.