Ticket #1990 (closed bug: fixed)
GC bug with new embedding API
Reported by: | nwellnhof | Owned by: | whiteknight |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | embed/extend | Version: | master |
Severity: | medium | Keywords: | api gc packfile |
Cc: | Language: | ||
Patch status: | Platform: | all |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.