Release of OCaml 5.5.2
We have the pleasure of celebrating the anniversary of the first powered flight in Europe by announcing the release of OCaml 5.5.2.
OCaml 5.5.2 fixes various minor security issues, two rare miscompilations, a configuration issue with future versions of macOS, and one runtime events library issue.
Overall, if you were already using any versions of OCaml 5.5, we are advising you to switch to OCaml 5.5.2 .
The full list of changes can be found in the full changelog.
Installation Instructions
The base compiler can be installed as an opam switch with the following commands:
opam update
opam switch create 5.5.2
The source code for the release is also directly available on:
Fine-Tuned Compiler Configuration
If you want to tweak the configuration of the compiler, you can switch to the option variant with:
opam update
opam switch create <switch_name> ocaml-variants.5.5.2+options <option_list>
where <option_list> is a space separated list of ocaml-option-* packages.
For instance, for a flambda and no-flat-float-array switch:
opam switch create 5.5.2+flambda+nffa ocaml-variants.5.5.2+options ocaml-option-flambda ocaml-option-no-flat-float-array
See full changelog
Bug fixes
-
#15045: Atomic loads whose results are unused should not be removed during dead-code elimination. (Xavier Clerc, review by Steven Dolan and KC Sivaramakrishnan)
-
#15067, #15071: Fix detection of functions available in the future on macOS. (Antonin Décimo, review by Nicolás Ojeda Bär and Damien Doligez)
-
#15112, OSEC-2026-22:
Unix.map_file: protect against overflow when computing the data size. (Xavier Leroy and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär and Edwin Török) -
#15113, OSEC-2026-21:
Str.string_partial_match: make sure captured groups are valid. (Xavier Leroy, review by Nicolás Ojeda Bär and Edwin Török) -
#15115, OSEC-2026-23: Fix multiple issues in demarshaling (
Marshal.from_{channel,string,bytes}) (Xavier Leroy, review by Nicolás Ojeda Bär) -
#15133, OSEC 2026-24: Multiple issues in command quoting on Windows (Xavier Leroy and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär)
-
#15119, OSEC-2026-25: Harden decoding of runtime events messages from ring buffers. (Sadiq Jaffer, report by Hannes Mehnert, review by Olivier Nicole and Edwin Török)
-
#15177, OSEC-2026-26: Maintain custom events cache integrity. (Sadiq Jaffer, report by Hannes Mehnert, review by Edwin Török)
-
#15043, #15076: runtime events library, fix an infinite loop when a user event is larger than half the ring buffer. (Tim McGilchrist, review by Sadiq Jaffer)
-
#15185, #15187: fix a pattern-matching miscompilation on certain combinations of immediate ranges and redundant patterns (Gabriel Scherer, report by Alperer Keleş, review by Vincent Laviron and Florian Angeletti)