Skip to content
Success

Changes

Summary

  1. callback.c: register the bytecode fragment used for callbacks (commit: f8970c4) (details)
  2. Revised linking of trap frames in bytecode interpreter stack (commit: 53d55f2) (details)
  3. Revised scanning of bytecode interpreter stack (commit: 9476d5d) (details)
  4. major_gc.c: use no-naked-pointers mode even in bytecode (commit: 4a953a2) (details)
  5. interp.c: remove two assertions that cannot be checked without the page table (commit: 552bc3e) (details)
Commit f8970c4b15df1a05b4b2b70d069cba930c96a3bd by xavier.leroy
callback.c: register the bytecode fragment used for callbacks

So that the return address pushed on the bytecode interpreter stack
is correctly recognized as a code pointer.
(commit: f8970c4)
The file was modifiedruntime/callback.c (diff)
Commit 53d55f252204f8537ed5014e1896328df5652049 by xavier.leroy
Revised linking of trap frames in bytecode interpreter stack

Rather than storing a pointer to the previous frame in the Trap_link
field of the current frame, store the distance (pointer difference)
between the current frame and the previous frame, tagged as an OCaml
integer.

Using a tagged integer instead of a raw pointer means fever problems
later with strict no-naked-pointer support.

Using a distance rather than an absolute address simplifies
the code that resizes the stack.
(commit: 53d55f2)
The file was modifiedruntime/stacks.c (diff)
The file was modifiedruntime/caml/stacks.h (diff)
The file was modifiedruntime/backtrace_byt.c (diff)
The file was modifiedruntime/interp.c (diff)
Commit 9476d5d2329820a52eba9659ae96af5b9da3c424 by xavier.leroy
Revised scanning of bytecode interpreter stack

In no-naked-pointers mode, recognize and skip code pointers present in
the stack of the bytecode interpreter.  This is needed only for
the scan at beginning of a major GC cycle, not for the scan done
at every minor GC.
(commit: 9476d5d)
The file was modifiedruntime/roots_byt.c (diff)
Commit 4a953a2b135a7fb6096197c4e10a90e5fd735c58 by xavier.leroy
major_gc.c: use no-naked-pointers mode even in bytecode

Earlier, no-naked-pointers mode was effective only in native code.
(commit: 4a953a2)
The file was modifiedruntime/major_gc.c (diff)
Commit 552bc3e77c53bf3aba0d9a6f1dbfb5271dd8b88f by xavier.leroy
interp.c: remove two assertions that cannot be checked without the page table

`!Is_in_value_area(pc)` is always false if we turn the page table off.
A better check would be `caml_find_code_fragment_by_pc(pc) != NULL`,
but I feel this is too costly even for the debug mode of the interpreter.
(commit: 552bc3e)
The file was modifiedruntime/interp.c (diff)