[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] PATCH: allow signal handlers to be called from any thr
From: |
Jörg F . Wittenberger |
Subject: |
[Chicken-hackers] PATCH: allow signal handlers to be called from any thread. |
Date: |
Mon, 30 Nov 2015 12:44:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Icedove/38.3.0 |
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
0001-allowsignalhandlerstobecalledfromanythread.patch
Description: Text Data
[Chicken-hackers] Diagnosis for; How to interpret chicken post mortem?, Jörg F . Wittenberger, 2015/11/29