SEGV

Stephen Weeks MLton@sourcelight.com
Tue, 26 Sep 2000 14:22:12 -0700 (PDT)


I'm pretty sure I understand what's going on with the latest SEGV.  The bug was
introduced when I added the hack to move the limit back by 512 bytes so that
small limit checks could be against zero.  The gc failed to ensure that frontier
<= limit when limit got moved back by 512.  So the mutator, which assumes 512
bytes are available, went on and allocated the bytes, moving past the limit.
This jives with your data showing that at the core dump, the frontier was 508
bytes past the limit.

This bug could only happen with a heap which had at least semispace size - 512
bytes live after a gc -- i.e. you're dead anyway due to running out of space.

I'm adding in a test to the gc to report out of memory in this case.