chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] PATCH: allow signal handlers to be called from any


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] PATCH: allow signal handlers to be called from any thread.
Date: Mon, 30 Nov 2015 12:51:53 +0100
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Icedove/38.3.0

Wait, this patch has a bug.  Sorry.

Am 30.11.2015 um 12:44 schrieb Jörg F. Wittenberger:
> Am 29.11.2015 um 17:55 schrieb Jörg F. Wittenberger:
>> Am 26.11.2015 um 11:29 schrieb Jörg F. Wittenberger:
>> The signal handler in the other thread will happily set the global
>> variable C_stack_limit to point 1000 word off the stack pointer at the
>> other thread.
> 
> Perhaps the attached patch is the smallest to avoid both the problems: a
> increasing leak on C_stack_limit if the signals arrive at the chicken
> thread before being handled and the confusion caused when signals are
> dispatched to another threads.
> 
> Does two things:
> 
> a) Don't overwrite saved_stack_limit multiple times.
> 
> b) Use a known global value `stack_bottom` as the temporary value for
> C_stack_limit to trigger garbage collection and interrupt dispatch.
> 
> Best
> 
> /Jörg
> 
> 
> 
> _______________________________________________
> Chicken-hackers mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-hackers
> 




reply via email to

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