Thicket thicket
ocaml
REPOS 1

Core covers the OCaml compiler and language RFCs.

W35.2026 · 24–30 Augocaml/ocaml

Fixes

  • Unmarshaling overflow guard (merged): Marshal.from_string and Marshal.from_channel now reject marshaled data whose header_len + data_len overflows, preventing ineffective bounds checks. Backported to 4.14 in #15030. (#15019)

  • Runtime events ring buffer size overflow (merged): The ring buffer file size is now a size_t with an overflow check. Previously, e=21,d=128 caused SIGBUS and e=22+ silently corrupted event names. (#15000)

  • Win32 thread starvation regression (open): A non-yielding thread on Windows 5.5.0 held the runtime lock indefinitely, starving other threads in its domain. The fix corrects an invalid backup-thread handle passed to caml_plat_thread_equal. Reported in #15028; fix in #15029.

  • Win32 Unix.select descriptor mapping (open): Two bugs caused out-of-bounds lookups or wrong descriptors when a socket appeared in multiple fd lists or duplicates existed within one list. The fix replaces positional indices with per-mode handle sets. Reported in #14758; fix in #15025.

  • POWER assembler error for frames > 32 KB (open): Frame-management offsets exceeding the 16-bit immediate range now use addis-based sequences. Previously, functions with ~6000 locals failed with "operand out of range". (#15021)

Features

  • Bit counting primitives (open): Int.popcount, Int.leading_zeros, and Int.trailing_zeros become %popcount, %clz, %ctz primitives. arm64 emits native clz/ctz; all backends gain a speedup over the prior OCaml-level implementations. (#15018)

  • Global roots debugging (open): Adds Gc.check_roots (runtime abort on corrupted root) and a GDB ocaml roots command that reports the registration site of a damaged root. XOR-stamped cells and a provenance skiplist track origin. (#15027)

  • ocamldebug 64-bit headers (open): The REQ_GET_HEADER protocol now transmits the full 64-bit object header on 64-bit platforms, fixing incorrect array sizes for objects > 2²² words. May require patches in earlybird. (#15022)