Opened 10 years ago
Closed 10 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: |
Description
Occasionally we still run out of stack. See for example:
- Today's Salmonella run of scsh-process (somewhere halfway down the page is an
ERROR) - Stack overflow in scsh-process, experienced by TheLemonMan
- Valgrind run of the above
Change History (2)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Fixed by 5d2a17a, f2ed421, 10ef6f6.
Note: See
TracTickets for help on using
tickets.

OK, the reason for this is extremely simple and I don't understand why this hasn't caused problems before:
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)C_demand()call will take care of handling this by triggering a GC/signal handler.C_stack_overflow_check(or a direct call toC_stack_check1) performs more or less the same checks asC_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 aC_CIRCULAR_DATA_ERROR, if the signal happens just before a call toequal?.