diff options
author | Chris Lattner <sabre@nondot.org> | 2003-01-13 01:00:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-01-13 01:00:02 +0000 |
commit | 5bebd807a3390391fb53a98631e158dbfb754ed9 (patch) | |
tree | be4e1da683a28c138454d23ab5f3a66ef28cf851 /llvm/lib/ExecutionEngine | |
parent | d49518c53429af2f69fa2d2a3dd43ff9ddfbf422 (diff) | |
download | bcm5719-llvm-5bebd807a3390391fb53a98631e158dbfb754ed9.tar.gz bcm5719-llvm-5bebd807a3390391fb53a98631e158dbfb754ed9.zip |
Bad segvs actually cause a segv now
llvm-svn: 5255
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/Callback.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/Callback.cpp b/llvm/lib/ExecutionEngine/JIT/Callback.cpp index b843e106895..3b40e2ebe1d 100644 --- a/llvm/lib/ExecutionEngine/JIT/Callback.cpp +++ b/llvm/lib/ExecutionEngine/JIT/Callback.cpp @@ -19,8 +19,15 @@ static void TrapHandler(int TN, siginfo_t *SI, ucontext_t *ucp) { #ifdef REG_EIP /* this code does not compile on Sparc! */ if (SI->si_code != SEGV_MAPERR || SI->si_addr != 0 || ucp->uc_mcontext.gregs[REG_EIP] != 0) { - std::cerr << "Bad SEGV encountered!\n"; - abort(); + std::cerr << "Bad SEGV encountered EIP = 0x" << std::hex + << ucp->uc_mcontext.gregs[REG_EIP] << " addr = " + << SI->si_addr << "!\n"; + + struct sigaction SA; // Restore old SEGV handler... + SA.sa_handler = SIG_DFL; + SA.sa_flags = SA_NOMASK; + sigaction(SIGSEGV, &SA, 0); + return; // Should core dump now... } // The call instruction should have pushed the return value onto the stack... |