StanzaOrg / lbstanza-old

L.B. Stanza Programming Language
Other
216 stars 23 forks source link

Fix a bug in skip-live #156

Closed OlegPliss closed 2 years ago

OlegPliss commented 2 years ago

When preliminary check finds that partial GC cannot recover enough space for desired nursery size + allocation size., or full GC is requested), mark-compact can be called for a heap with uninitialized area in the range from old-objects-end to nursery-start. In a very rare case when all old objects are live at this moment, and old objects end is moved to heap start, a scan for solid prefix can reach this area and try to decode garbage there. The fix is to eliminate a special mode of operation with old objects end set to heap start.

I can only reproduce this crash when setting desired max heap size below current heap size with set-max-heap-size.