[llvm-commits] [llvm] r49000 - /llvm/trunk/lib/System/Unix/Process.inc

Nate Begeman nbegeman at apple.com
Mon Apr 7 11:28:08 PDT 2008


OK, sounds like we need to include availability macros or something  
and do different things on 10.4 and 10.5.

I'll put it in my queue.

Thanks,
Nate

On Apr 6, 2008, at 11:43 PM, Christopher Lamb wrote:

> Hi Nate,
>
> This broke turning off crash dumping on my system, the previous code  
> seemed to work fine. I'm running OS X 10.4.11.
> --
> Chris
>
> On Mar 31, 2008, at 3:19 PM, Nate Begeman wrote:
>> Author: sampo
>> Date: Mon Mar 31 17:19:25 2008
>> New Revision: 49000
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=49000&view=rev
>> Log:
>> Actually disable crash reporting on Mac OS X, returning bugpoint to  
>> speedy
>> crash miscompilations.
>>
>> Modified:
>>     llvm/trunk/lib/System/Unix/Process.inc
>>
>> Modified: llvm/trunk/lib/System/Unix/Process.inc
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Process.inc?rev=49000&r1=48999&r2=49000&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/lib/System/Unix/Process.inc (original)
>> +++ llvm/trunk/lib/System/Unix/Process.inc Mon Mar 31 17:19:25 2008
>> @@ -123,10 +123,6 @@
>>    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 @@
>>  #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
>>  }
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> --
> Christopher Lamb
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080407/00e94143/attachment.html>


More information about the llvm-commits mailing list