• en

OCaml 4.12.1

This page describes OCaml 4.12.1, released on Feb 24, 2021. This is a bug-fix release of OCaml 4.12.0.

Configuration options

The configuration of the installed opam switch can be tuned with the following options:

  • ocaml-option-32bit: set OCaml to be compiled in 32-bit mode for 64-bit Linux and OS X hosts
  • ocaml-option-afl: set OCaml to be compiled with afl-fuzz instrumentation
  • ocaml-option-bytecode-only: compile OCaml without the native-code compiler
  • ocaml-option-default-unsafe-string: set OCaml to be compiled without safe strings by default
  • ocaml-option-flambda: set OCaml to be compiled with flambda activated
  • ocaml-option-fp: set OCaml to be compiled with frame-pointers enabled
  • ocaml-option-musl: set OCaml to be compiled with musl-gcc
  • ocaml-option-nnp : set OCaml to be compiled with --disable-naked-pointers
  • ocaml-option-nnpchecker: set OCaml to be compiled with --enable-naked-pointers-checker
  • ocaml-option-no-flat-float-array: set OCaml to be compiled with --disable-flat-float-array
  • ocaml-option-static :set OCaml to be compiled with musl-gcc -static

For instance, one can install a switch with both flambda and the naked-pointer checker enabled with

opam switch create 4.12.1+flambda+nnpchecker --package=ocaml-variants.4.12.1+options,ocaml-option-flambda,ocaml-option-nnpchecker

or with opam 2.1:

opam switch create 4.12.1+flambda -ocaml-variants.4.12.1+options ocaml-option-flambda

Source distribution

  • Source tarball (.tar.gz) for compilation under Unix (including Linux and macOS) and Microsoft Windows (including Cygwin).
  • Also available in .zip format.
  • The official development repo is hosted on GitHub.

Changes

Bug fixes:

  • #10107: Ensure modules compiled with -afl-instrument can still link on platforms without AFL support. (David Allsopp, review by Xavier Leroy)

  • #10294, #10295: fix an assert-failure in pattern-matching compilation (Gabriel Scherer, review by Thomas Refis and Luc Maranget, report by Nicolás Ojeda Bär)

  • #10310: configure's --enable-spacetime option now causes an error rather than being silently ignored. (David Allsopp, review by Gabriel Scherer)

  • #10351: Fix DLL loading with binutils 2.36+ on mingw-w64 (David Allsopp, review by Nicolás Ojeda Bär)

  • #10442, #10446: Fix regression in the toplevel to #directory caused by corrections and improvements to the Load_path in #9611. #directory now adds the path to the start of the load path again (so files in the newly added directory take priority). (David Allsopp, report by Vasile Rotaru, review by Florian Angeletti and Nicolás Ojeda Bär)

  • #10449: Fix major GC work accounting (the GC was running too fast). (Damien Doligez, report by Stephen Dolan, review by Nicolás Ojeda Bär and Sadiq Jaffer)

  • #10478: Fix segfault under Windows due to a mistaken initialization of thread ID when a thread starts. (David Allsopp, Nicolás Ojeda Bär, review by Xavier Leroy)

  • #10626, #10628: Wrong reloading of the x86-64 instruction for integer multiplication by a constant, causing the assembler to reject the ocamlopt-generated code. (Xavier Leroy, report by Dave Aitken, review by Vincent Laviron)

Manual and documentation

  • #10497: Styling changes in the post-processed HTML manual (webman) (Wiktor Kuchta, review by Florian Angeletti)