[Top][All Lists]

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

Re: [Chicken-hackers] [PATCH]: Handle missing error codes in `barf`

From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH]: Handle missing error codes in `barf`
Date: Sat, 13 Jun 2015 14:37:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Jun 13, 2015 at 10:42:05AM +0200, "Jörg F. Wittenberger" wrote:
> IMHO `barf` should never reach this line:
>   default: panic(C_text("illegal internal error code"));

Good catch!  Attached is a signed-off copy of your patch, with
an addition to NEWS, and a copy that applies cleanly against
the chicken-5 branch as well.

I think this change is important and simple enough to put into
the prerelease branch as well.

PS: I find the behaviour of the signal handler a bit erratic.  If I
send SIGBUS, for example, it will correctly trigger an exception.
If then I send SIGILL, it will do nothing due to the default signal
mask not including this signal (I think).  If I then change the
signal mask to the empty set, SIGILL will trigger the exception,
but after that, sending SIGBUS no longer does anything.  I can't
explain this; the code of set-signal-mask! looks fine.

Note that this has nothing to do with this patch, this simply fixes
the handler so it will actually convert the error code into an
exception instead of panicking.  The bug (if it is a bug) is elsewhere.


Attachment: CHICKEN-5-0001-Add-cases-for-unhandled-error-codes-to-barf.patch
Description: Text Data

Attachment: MASTER-0001-Add-cases-for-unhandled-error-codes-to-barf.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature

reply via email to

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