[llvm] r270395 - Enable use of sigaltstack for signal handlers when available. With this,
Richard Smith via llvm-commits
llvm-commits at lists.llvm.org
Sun May 22 23:47:39 PDT 2016
Author: rsmith
Date: Mon May 23 01:47:37 2016
New Revision: 270395
URL: http://llvm.org/viewvc/llvm-project?rev=270395&view=rev
Log:
Enable use of sigaltstack for signal handlers when available. With this,
backtraces from the signal handler on stack overflow now work reliably (on my
system at least...).
Modified:
llvm/trunk/lib/Support/Unix/Signals.inc
Modified: llvm/trunk/lib/Support/Unix/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Signals.inc?rev=270395&r1=270394&r2=270395&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Signals.inc (original)
+++ llvm/trunk/lib/Support/Unix/Signals.inc Mon May 23 01:47:37 2016
@@ -107,7 +107,7 @@ static void RegisterHandler(int Signal)
struct sigaction NewHandler;
NewHandler.sa_handler = SignalHandler;
- NewHandler.sa_flags = SA_NODEFER|SA_RESETHAND;
+ NewHandler.sa_flags = SA_NODEFER | SA_RESETHAND | SA_ONSTACK;
sigemptyset(&NewHandler.sa_mask);
// Install the new handler, save the old one in RegisteredSignalInfo.
More information about the llvm-commits
mailing list