bug-libsigsegv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-libsigsegv] incompatible with libgc on Mac OS X?


From: William Lovas
Subject: Re: [bug-libsigsegv] incompatible with libgc on Mac OS X?
Date: Wed, 31 Aug 2011 11:13:46 -0400

Hi Bruno,

On Aug 31, 2011, at 3:32 AM, Bruno Haible <address@hidden> wrote:

> William Lovas wrote:
>> While trying to integrate libsigsegv's stack overflow handling into a
>> custom introductory programming language at CMU, i ran into an issue:
>> it looks like libsigsegv cannot be linked alongside the Boehm-Demers-
>> Weiser conservative garbage collector for C, at least on Mac OS X, as
>> both packages define a function catch_exception_raise.  On my MacBook
>> i get the following:
>> 
>>    ld: duplicate symbol _catch_exception_raise in
>>    /Users/wlovas/work/intro/15-122/c0/lib/libgc.a(os_dep.o) and
>>    /Users/wlovas/work/intro/15-122/c0/lib/libsigsegv.a(handler.o)
> 
> Yes, if you want to have both libgc.a and libsigsegv.a in the same
> application (I wonder why you need this? libsigsegv is mostly used for
> defining a garbage collector, which libgc already provides),

We compile to C, so we are using libgc as our garbage collector, but we wanted 
to use libsigsegv to catch stack overflows and emit a sensible error rather 
than just a segfault.  It doesn't seem like there's a simpler way of handling 
stack overflows in a portable manner..

>> Can any of you suggest a workaround?
> 
> Combine the fault handling code on the source code level. This needs to be
> done separately for MacOS X, Unix, and Win32.

Including the SIGSEGV signal handlers?

Thanks for the response..

William


reply via email to

[Prev in Thread] Current Thread [Next in Thread]