Features
-
Constructor unboxing / head shapes (open): PR #15227 extends
[@unboxed]to multi-constructor variant types by tracking head shapes (tag + block size) in the type checker. Affects pattern-matching compilation and the separability analysis. -
Warning 8 (partial-match) fatal by default (open, breaking): PR #15269 makes
ocamlc/ocamloptreject non-exhaustive matches by default. The toplevel retains the non-fatal behaviour. -
Automatic heap compaction (open, RFC): Issue #15242 proposes porting OxCaml's auto-compaction to trunk, triggered at the end of major GC cycles when free-to-live ratio exceeds
OCAMLRUNPARAM=O(default 500).
Compatibility and Releases
- OCaml 4.14.5 (release, 2026-11-06): six security fixes (OSEC-2026-18/21/22/23/24/30) covering
Marshal,Str,Unix.map_file, demarshaling, Windows command quoting, and ephemeron marking; plus a pattern-compilation fix and a macOS compatibility fix.
Fixes
-
Typechecker variance check: 99.5% speedup on constrained parameters (merged): PR #15219 adds a fast path using equal-subexpression matching before falling back to the expensive equivalence check. Reduces a 760 s case to 3.7 s.
-
Windows: Ctrl-Break no longer kills the process (merged): PR #15267 restores the console-control handler that maps Ctrl-Break to
SIGINT. Cherry-picked to 5.6. -
Unix.ADDR_INETrejects out-of-range ports (merged): PR #15261 raisesInvalid_argumentfor ports outside 0–65535 instead of silently truncating modulo 65536. Fixes #15249. -
Native array bounds check bypassed at index 2⁵⁴ (open): Issue #15244 reports that
ocamloptreturnsa.(0)instead of raisingInvalid_argumentfora.(18014398509481984). PR #15161 adds overflow checks to the shift rewrite.