Opened 4 years ago

Closed 3 years ago

#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:


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

Patch attached.

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by joergw

Patch allowing signal handlers to be dispatched to any pthread

comment:1 Changed 4 years ago by sjamaan

  • Milestone changed from someday to 4.11.0

comment:2 Changed 3 years 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.