diff options
author | Nate Begeman <natebegeman@mac.com> | 2008-03-31 22:19:25 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2008-03-31 22:19:25 +0000 |
commit | f8be3836e3ddfd813627c96bf38ad13d1311fe64 (patch) | |
tree | 3b4873b57011baf8588f2090cb237344e7d980e8 /llvm/lib/System/Unix | |
parent | 3717cdaf22ac0d0825f836a9ee029760741f68b4 (diff) | |
download | bcm5719-llvm-f8be3836e3ddfd813627c96bf38ad13d1311fe64.tar.gz bcm5719-llvm-f8be3836e3ddfd813627c96bf38ad13d1311fe64.zip |
Actually disable crash reporting on Mac OS X, returning bugpoint to speedy
crash miscompilations.
llvm-svn: 49000
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r-- | llvm/lib/System/Unix/Process.inc | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/llvm/lib/System/Unix/Process.inc b/llvm/lib/System/Unix/Process.inc index addfef358f9..a2db4c675af 100644 --- a/llvm/lib/System/Unix/Process.inc +++ b/llvm/lib/System/Unix/Process.inc @@ -123,10 +123,6 @@ int Process::GetCurrentGroupId() { return getgid(); } -#ifdef HAVE_MACH_MACH_H -#include <mach/mach.h> -#endif - // Some LLVM programs such as bugpoint produce core files as a normal part of // their operation. To prevent the disk from filling up, this function // does what's necessary to prevent their generation. @@ -138,25 +134,12 @@ void Process::PreventCoreFiles() { #endif #ifdef HAVE_MACH_MACH_H - // Disable crash reporting on Mac OS/X. - - // get information about the original set of exception ports for the task - mach_msg_type_number_t Count = 0; - exception_mask_t OriginalMasks[EXC_TYPES_COUNT]; - exception_port_t OriginalPorts[EXC_TYPES_COUNT]; - exception_behavior_t OriginalBehaviors[EXC_TYPES_COUNT]; - thread_state_flavor_t OriginalFlavors[EXC_TYPES_COUNT]; - kern_return_t err = - task_get_exception_ports(mach_task_self(), EXC_MASK_ALL, OriginalMasks, - &Count, OriginalPorts, OriginalBehaviors, - OriginalFlavors); - if (err == KERN_SUCCESS) { - // replace each with MACH_PORT_NULL. - for (unsigned i = 0; i != Count; ++i) - task_set_exception_ports(mach_task_self(), OriginalMasks[i], - MACH_PORT_NULL, OriginalBehaviors[i], - OriginalFlavors[i]); - } + // Disable crash reporting on Mac OS X. + signal(SIGABRT, _exit); + signal(SIGILL, _exit); + signal(SIGFPE, _exit); + signal(SIGSEGV, _exit); + signal(SIGBUS, _exit); #endif } |