ocaml-flambda / flambda-backend

The Flambda backend project for OCaml
93 stars 67 forks source link

Fix problems with GC compaction and non-consecutive function slots #2674

Closed Ekdohibs closed 2 weeks ago

Ekdohibs commented 4 weeks ago

If function slots were not consecutive, the GC would previously incorrectly scan them during compaction while trying to revert infix pointers. Note: due to an invariant in slot_offsets, this can't happen with the existing compiler.

mshinwell commented 4 weeks ago

(The precondition for this bug cannot be satisfied with the current compiler.)

mshinwell commented 4 weeks ago

Does this need a fix for runtime5?

Ekdohibs commented 4 weeks ago

I think this doesn't need a fix for runtime5, but I just noticed extern.c might need a fix as well; I'll look.

Ekdohibs commented 2 weeks ago

Compaction in runtime5 has already been merged, and works differently to runtime4 so doesn't need to be changed.