mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Actually disable crash reporting on Mac OS X, returning bugpoint to speedy
crash miscompilations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6faaef57b0
commit
82b53cd2ba
@ -123,10 +123,6 @@ int Process::GetCurrentGroupId() {
|
|||||||
return getgid();
|
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
|
// 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
|
// their operation. To prevent the disk from filling up, this function
|
||||||
// does what's necessary to prevent their generation.
|
// does what's necessary to prevent their generation.
|
||||||
@ -138,25 +134,12 @@ void Process::PreventCoreFiles() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MACH_MACH_H
|
#ifdef HAVE_MACH_MACH_H
|
||||||
// Disable crash reporting on Mac OS/X.
|
// Disable crash reporting on Mac OS X.
|
||||||
|
signal(SIGABRT, _exit);
|
||||||
// get information about the original set of exception ports for the task
|
signal(SIGILL, _exit);
|
||||||
mach_msg_type_number_t Count = 0;
|
signal(SIGFPE, _exit);
|
||||||
exception_mask_t OriginalMasks[EXC_TYPES_COUNT];
|
signal(SIGSEGV, _exit);
|
||||||
exception_port_t OriginalPorts[EXC_TYPES_COUNT];
|
signal(SIGBUS, _exit);
|
||||||
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]);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user