[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with exception handling: WAS: no thread-safe +initialize in
From: |
David Chisnall |
Subject: |
Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime? |
Date: |
Mon, 13 Jun 2011 13:30:58 +0100 |
On 13 Jun 2011, at 13:19, Sebastian Reitenbach wrote:
> I just reread the Linux signal manual, and saw, its not retruning the address
> of the actual handler, but of the old handler, so I exchanged the calls
> later in that function from i.e. signal(SIGSEGV, env->segv) to
> signal(SIGSEGV, SIG_DFL)
> but without difference in the behaviour observed.
This will break any code that had already set a signal handler (for example,
anything using GC, since libgc implements dirty bits for its generational
garbage collection by marking pages as no-access and then catching the
SIGSEGV). A better solution would be to stop using the C signal() function and
use the POSIX sigaction() function. Since this has been in the standard since
1990, I'd imagine that it's pretty well supported, although someone should
check MinGW.
Even with that change, this code isn't even remotely thread safe, so it would
be better to replace it with something less fragile. Is there no port of
libexecinfo to OpenBSD? If there is, then it would be a good idea to add that
as a dependency for the FreeBSD port and use the backtrace() version.
David
-- Sent from my brain
- Re: no thread-safe +initialize in old gnustep runtime?, (continued)
- Re: no thread-safe +initialize in old gnustep runtime?, Nicola Pero, 2011/06/08
- Re: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/09
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Richard Frith-Macdonald, 2011/06/13
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/13
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Robert Slover, 2011/06/13
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/13
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/13
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?,
David Chisnall <=
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/13
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/14
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, David Chisnall, 2011/06/14
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Richard Frith-Macdonald, 2011/06/14
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Richard Frith-Macdonald, 2011/06/14
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Riccardo Mottola, 2011/06/14
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/15
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Riccardo Mottola, 2011/06/15
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Sebastian Reitenbach, 2011/06/15
- Re: Problem with exception handling: WAS: no thread-safe +initialize in old gnustep runtime?, Wolfgang Lux, 2011/06/14