Thicket thicket
ocaml
REPOS 2

Core covers the OCaml compiler and language RFCs.

W43.2026 · 19–25 Octocaml/ocaml

Compatibility and Releases

  • OCaml 5.5.2 released 2026-10-23. Contains six security fixes (OSEC-2026-21 through OSEC-2026-26) and four bugfixes including two miscompilations and a runtime-events infinite loop. Release notes

Features

  • Variance-check performance (open): Consolidating the variance check for constrained parameters reduces compile time from 731 s to 83 s (≈8.75×) on a large object-type file that previously stalled trunk/5.6. Proposed in #15188; targeted for 5.6.
  • amd64 comparison codegen (open): Replaces cmp; setCC; movzx with xor; cmp; setCC to avoid partial-register stalls. Benchmarks show ≈10 % runtime reduction on integer-comparison loops. Proposed in #15178.
  • Warning 10 message extended (open): non-unit-statement now reports the actual type of the offending expression (e.g. "but has type string"), aiding diagnosis. Proposed in #15194.

Fixes

  • Pattern-matching miscompilation (merged): ocamlopt and ocamlc crashed or produced wrong results on certain combinations of integer-range patterns with redundant cases, instead of raising Match_failure. Fixed in #15187; affects 5.4.1, 4.14.4, and trunk.
  • Windows Unix.LargeFile.lseek (merged): The function interpreted its int64 argument as a tagged integer, seeking to a heap-address-derived offset. Regression since 5.1.0. Fixed in #15186; cherry-picked to 5.6.
  • Runtime-events ring buffer hang (merged): Runtime_events.User.write with an event larger than half the ring spun forever. The guard now rejects such events and suggests a correct OCAMLRUNPARAM=e size. Fixed in #15076.
  • ocamlopt -linscan miscompiles Atomic.compare_and_set (open): The linear-scan register allocator allows result and argument registers to overlap for atomic ops, producing wrong values or segfaults on amd64. Introduced by the native CAS in #14980. Reported in #15189; fix proposed in #15192.