Opened 8 years ago

Closed 8 years ago

#1283 closed defect (fixed)

Runaway stack problem

Reported by: sjamaan Owned by:
Priority: critical Milestone: 4.11.0
Component: core libraries Version: 4.10.x
Keywords: Cc:
Estimated difficulty:


Occasionally we still run out of stack. See for example:

Change History (2)

comment:1 Changed 8 years ago by sjamaan

OK, the reason for this is extremely simple and I don't understand why this hasn't caused problems before:

  • When a signal is received by the process, we call C_raise_interrupt, which resets the stack pointer to the bottom of the stack, so that the stack checks "think" the stack is full (while really it isn't)
  • Normally, a C_demand() call will take care of handling this by triggering a GC/signal handler.
  • A C_stack_overflow_check (or a direct call to C_stack_check1) performs more or less the same checks as C_demand() does, so if this is the first thing that happens after a signal arrived, it will simply bomb. That's why sometimes it shows a stack overflow error and other times a C_CIRCULAR_DATA_ERROR, if the signal happens just before a call to equal?.

comment:2 Changed 8 years ago by evhan

Resolution: fixed
Status: newclosed

Fixed by 5d2a17a, f2ed421, 10ef6f6.

Note: See TracTickets for help on using tickets.