[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Detect and signal error on stack overflow
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH] Detect and signal error on stack overflow in `apply` |
Date: |
Sat, 10 Sep 2016 12:41:37 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sat, Sep 10, 2016 at 10:27:21PM +1200, Evan Hanson wrote:
> I think looping forever in this situation is potentially quite nasty for
> users, since without an understanding of how `apply` works under the
> hood it'd be very difficult to debug.
You raise a good point. I agree this needs improvement.
> The attached patch makes CHICKEN
> raise a Scheme-level exception when this happens, instead. The approach
> is extremely simple, please see the commit message for an explanation.
Looks good to me, except for one thing: changing the signature of
C_stack_overflow(). This should be avoided in master, because who
knows what eggs rely on this function's signature.
Maybe have a C_stack_overflow_with_loc instead? In chicken-5 I'd be
fine with just replacing C_stack_overflow().
Cheers,
Peter
signature.asc
Description: Digital signature