Opened 10 years ago

Closed 9 years ago

#815 closed defect (fixed)

Linux stack overflow detection

Reported by: gb Owned by:
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:


describes a problem which affected someone running ARM Linux. It's not clear what Linux versions and architectures are affected.

Traditionally, Linux maps in pages of the initial thread's control/C stack as they're touched. The new (or at least previously unobserved) behavior involves the kernel not mapping a page that would be adjacent to another mapped region (like the guard page region that CCL uses to detect stack overflow) and causes the stack limit check in the recursive marker to fail.

I think that the simplest fix is likely to ensure that all pages between the stack area's softlimit and current sp are mapped read-write, so that the kernel's lazy faulting-in of stack pages doesn't try to exercise policy.

Change History (1)

comment:1 Changed 9 years ago by rme

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

The fix involved changing how rmark() detects that it's near the end of the stack.

Note: See TracTickets for help on using tickets.