Thicket thicket
ocaml
REPOS 1

Core covers the OCaml compiler and language RFCs.

W24.2026 · 8–14 Junocaml/ocaml

Features

  • Configurable domain stack size (open, #14860): A new S setting in OCAMLRUNPARAM (e.g. OCAMLRUNPARAM='S=50M') sets the per-domain stack size. Addresses stack overflows in C FFI code on spawned domains (#14195).

  • Weak.iter, Weak.iteri, Weak.foldi_left (open, #14792): New stdlib functions that iterate live slots in a weak array. foldi_left is a C primitive passing each element directly to the callback, avoiding one heap allocation per live element.

  • Extensible IO channels (open, #14775): Proposal implementing the modular IO RFC. Adds user-defined in/out channels alongside existing C channels (renamed "native"). Under stdlib-team review.

Fixes

  • mark_header lazy-tag check (merged, #14856): Corrects an inverted comparison introduced in #14816 that could cause memory corruption and SEGVs in multi-domain programs using laziness. Not backported to 5.5.

  • Filename.quote_command redirection escaping on Windows (merged, #14853): Redirection arguments (e.g. ~stdout:"output&false") were not fully escaped, allowing command injection via Sys.command. The fix is proposed for backport to 5.5.

  • tfunctor expansion-node update (merged, #14845): Fixes an uncaught exception when expansion nodes contain tfunctor arguments. Also restores type abbreviations involving module-dependent types in copy_sep.

  • Native Iatomic_fetch_add on all backends (open, #14575): Replaces the C call path with inline assembly on amd64, arm64, riscv, and power. Benchmarks show the existing C path is faster in single-domain mode due to the caml_domain_alone() fast path; the native path targets multi-domain performance.

  • Object finalizer prevents collection (open, #14861): A Gc.finalise_last registered in an initializer block captures self implicitly through field lookup, creating a reference cycle that blocks garbage collection. Workaround: wrap the finalizer in a standalone function.