Summary

signal handling smashes memory management

Metadata

Attachments

Description

The signal handler stores a references relative (1000 words off) to the stack pointer of in effect during signal handlers invocation.

This may result in an overflow (if the stack pointer happens to be close to the border of the virtual address space.

It does (reproducible) set C_stack_limit to some point within the stack of unrelated pthreads. And, if many signals are dispatched, does overwrite saved_stack_limit.

See also http://lists.nongnu.org/archive/html/chicken-hackers/2015-12/msg00006.html

Patch attached.

Changes and comments

[2015-12-12 14:15:39 UTC] joergw attached 0008-Allowsignalhandlerstobedispatchedtomultiplethreads.patch (description=Patch allowing signal handlers to be dispatched to any pthread)

[2015-12-12 15:01:33 UTC] sjamaan changed milestone from someday to 4.11.0

[2016-01-14 20:19:39 UTC] sjamaan changed status from new to closed

[2016-01-14 20:19:39 UTC] sjamaan set resolution to fixed

[2016-01-14 20:19:39 UTC] sjamaan wrote:

Patch applied as 8294683 (master) and 169cb27 (chicken-5)