#1232 closed defect (fixed)

signal handling smashes memory management

Reported by: joergw Owned by:
Priority: critical Milestone: 4.11.0
Component: core libraries Version: 4.10.x
Keywords: signal handling, runtime Cc:
Estimated difficulty:

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.

Attachments (1)

0008-Allowsignalhandlerstobedispatchedtomultiplethreads.patch (2.3 KB) - added by joergw 20 months ago.
Patch allowing signal handlers to be dispatched to any pthread

Download all attachments as: .zip

Change History (3)

Changed 20 months ago by joergw

Patch allowing signal handlers to be dispatched to any pthread

comment:1 Changed 20 months ago by sjamaan

  • Milestone changed from someday to 4.11.0

comment:2 Changed 19 months ago by sjamaan

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.