Ticket #1990 (closed bug: fixed)
GC bug with new embedding API
|Reported by:||nwellnhof||Owned by:||whiteknight|
|Severity:||medium||Keywords:||api gc packfile|
I recently discovered a GC bug caused by the embedding API rewrite. It can be easily triggered by manually setting a low GC threshold like 64K. The problem is the following code sequence:
Parrot_api_load_bytecode_file (or Parrot_api_wrap_imcc_hack) some other code that triggers a GC Parrot_api_run_bytecode
The bytecode PMC returned by Parrot_api_load_bytecode_file and Parrot_api_wrap_imcc_hack is an UnmanagedStruct, so constant PMCs from the packfile (and maybe other things) don't get marked. These functions should return a real PMC that properly marks referenced objects.