OCaml release 5.1.1

Florian Angeletti <[email protected]> Fri, 8 Dec 2023 09:58:04 +0100 (CET)
Newsgroups gmane.comp.lang.caml.announce,gmane.comp.lang.caml.inria
Message-ID <[email protected]>
--=_1d4e8d7c-e721-448d-959a-5bbecc469077
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Dear OCaml users,=20

In the last three months after the release of OCaml 5.1.0, three significan=
t=20
regressions have been discovered in OCaml 5.1.0. Those regressions concern =
the=20
packaging of executables, the typechecking of OCaml programs, and the=20
performance of numerical codes.=20

Since those regressions affect many users and could have lasting effects, w=
e=20
have published a patch release, OCaml 5.1.1, fixing those issues.=20

As a major exception to our policy for patch releases, OCaml 5.1.1 will con=
tain=20
one breaking change in the standard library: the `Compression` flag has bee=
n=20
removed from the `Marshal` module.=20
This drastic measure has been taken because supporting zstd compression in =
the=20
standard library made zstd a dependency of all OCaml executables. Since the=
=20
compiler should not propagate its dependencies on end-users, the support fo=
r=20
compressed marshalling has been moved to a compiler internal library in 5.1=
.1.=20

Accounting for the still experimental nature of the multicore runtime, this=
=20
patch release 5.1.1 also contains safe fixes for subtle concurrency bugs in=
 the=20
OCaml runtime.=20

The full list of changes is available below for more details.=20

Happy hacking,=20
Florian Angeletti for the OCaml team.=20


Installation Instructions=20
-------------------------------=20

The base compiler can be installed as an opam switch with the following com=
mands:=20

opam update=20
opam switch create 5.1.1=20

The source code for the release is also directly available on:=20

* GitHub: https://github.com/ocaml/ocaml/archive/5.1.1.tar.gz=20
* Inria archive: https://caml.inria.fr/pub/distrib/ocaml-5.1/ocaml-5.1.1.ta=
r.gz=20

Changes in OCaml 5.1.1 (8 December 2023)=20
------------------------------------------------------------=20

### Standard Library:=20

* (*breaking change*) [#12562](https://github.com/ocaml/ocaml/issues/12562)=
, [#12734](https://github.com/ocaml/ocaml/issues/12734), [#12783](https://g=
ithub.com/ocaml/ocaml/issues/12783): Remove the `Marshal.Compression` flag =
to the=20
`Marshal.to_*` functions introduced in 5.1 by [#12006](https://github.com/o=
caml/ocaml/issues/12006), as it cannot=20
be implemented without risking to link -lzstd with all=20
ocamlopt-generated executables. The compilers are still able to use=20
ZSTD compression for compilation artefacts.=20
(Xavier Leroy and David Allsopp, report by Kate Deplaix, review by=20
Nicol=E1s Ojeda B=E4r, Kate Deplaix, and Damien Doligez).=20

### Bug Fixes:=20

- #12623 fix the computation of variance composition=20
(Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)=20

- #12581, #12609: Fix error on uses of packed modules outside their pack=20
to correctly handle nested packs=20
(Vincent Laviron, report by Javier Ch=E1varri, review by Pierre Chambart)=
=20


- #12645, #12649 fix error messages for cyclic type definitions in presence=
 of=20
the `-short-paths` flag.=20
(Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)=20

- #12757](https://github.com/ocaml/ocaml/issues/12757): Fix ocamlnat (nativ=
e toplevel) by registering frametables correctly=20
(Stephen Dolan, Nick Barnes and Mark Shinwell,=20
review by Vincent Laviron and S=E9bastien Hinderer)=20

- #12791: `extern` is applied to definitions of `caml_builtin_cprim`=20
and `caml_names_of_builtin_cprim` when linking bytecode '-custom'=20
executables with a C++ linker.=20
(Shayne Fletcher, review by Antonin D=E9cimo and Xavier Leroy)=20

### GC Performance Regression Fixes=20

- #12318: GC: simplify the meaning of custom_minor_max_size: blocks with=20
out-of-heap memory above this limit are now allocated directly in=20
the major heap.=20
(Damien Doligez, report by Stephen Dolan, review by Gabriel Scherer)=20

- #12439]: Finalize and collect dead custom blocks during minor collection=
=20
(Damien Doligez, review by Xavier Leroy, Gabriel Scherer and KC=20
Sivaramakrishnan)=20

- #12590, #12595: Move `caml_collect_gc_stats_sample` in=20
`caml_empty_minor_heap_promote` before barrier arrival.=20
(B. Szilvasy, review by Gabriel Scherer)=20

- #12491, #12493 #12500, #12754: Do not change GC pace when creating sub-ar=
rays of bigarrays=20
(Xavier Leroy, report by Ido Yariv, analysis by Gabriel Scherer,=20
review by Gabriel Scherer and Fabrice Buoro)=20

### Runtime Bug Fixes=20

- #11800, #12707: fix an assertion race condition in `install_backup_thread=
`=20
(Jan Midtgaard, review by Gabriel Scherer)=20

- #12486, #12535: Fix delivery of unhandled effect exceptions on amd64 with=
=20
--enable-frame-pointers=20
(Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)=20

- #12712, #12742: fix an assertion boundary case in `caml_reset_young_limit=
`=20
(Jan Midtgaard, review by Guillaume Munch-Maccagnoni)=20

- #12713, #12715: disable common subexpression elimination for atomic loads=
=20
(Gabriel Scherer and Vincent Laviron,=20
review by Vincent Laviron, KC Sivaramakrishnan and Xavier Leroy,=20
report by Vesa Karvonen and Carine Morel)=20


--=_1d4e8d7c-e721-448d-959a-5bbecc469077
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div>Dear OCaml users,<br><br>In the last three =
months after the release of OCaml 5.1.0, three significant<br>regressions h=
ave been discovered in OCaml 5.1.0. Those regressions concern the<br>packag=
ing of executables, the typechecking of OCaml programs, and the<br>performa=
nce of numerical codes.<br><br>Since those regressions affect many users an=
d could have lasting effects, we<br>have published a patch release, OCaml 5=
.1.1, fixing those issues. <br><br>As a major exception to our policy for p=
atch releases, OCaml 5.1.1 will contain<br>one breaking change in the stand=
ard library: the `Compression` flag has been<br>removed from the `Marshal` =
module.<br>This drastic measure has been taken because supporting zstd comp=
ression in the<br>standard library made zstd a dependency of all OCaml exec=
utables. Since the<br>compiler should not propagate its dependencies on end=
-users, the support for<br>compressed marshalling has been moved to a compi=
ler internal library in 5.1.1.<br><br>Accounting for the still experimental=
 nature of the multicore runtime, this<br>patch release 5.1.1 also contains=
 safe fixes for subtle concurrency bugs in the<br>OCaml runtime.<br><br>The=
 full list of changes is available below for more details.<br><br>Happy hac=
king,<br>Florian Angeletti for the OCaml team.<br><br><br>Installation Inst=
ructions<br></div><div>-------------------------------<br data-mce-bogus=3D=
"1"></div><div><br>The base compiler can be installed as an opam switch wit=
h the following commands:<br><br>&nbsp;&nbsp;&nbsp; opam update<br>&nbsp;&n=
bsp;&nbsp; opam switch create 5.1.1<br><br>The source code for the release =
is also directly available on:<br><br>* GitHub: https://github.com/ocaml/oc=
aml/archive/5.1.1.tar.gz<br>* Inria archive: https://caml.inria.fr/pub/dist=
rib/ocaml-5.1/ocaml-5.1.1.tar.gz<br><br>Changes in OCaml 5.1.1 (8 December =
2023) <br></div><div>------------------------------------------------------=
------<br data-mce-bogus=3D"1"></div><div><br>### Standard Library:<br><br>=
&nbsp; * (*breaking change*) [#12562](https://github.com/ocaml/ocaml/issues=
/12562), [#12734](https://github.com/ocaml/ocaml/issues/12734), [#12783](ht=
tps://github.com/ocaml/ocaml/issues/12783): Remove the `Marshal.Compression=
` flag to the<br>&nbsp;&nbsp;&nbsp; `Marshal.to_*` functions introduced in =
5.1 by [#12006](https://github.com/ocaml/ocaml/issues/12006), as it cannot<=
br>&nbsp;&nbsp;&nbsp; be implemented without risking to link -lzstd with al=
l<br>&nbsp;&nbsp;&nbsp; ocamlopt-generated executables.&nbsp; The compilers=
 are still able to use<br>&nbsp;&nbsp;&nbsp; ZSTD compression for compilati=
on artefacts.<br>&nbsp;&nbsp;&nbsp; (Xavier Leroy and David Allsopp, report=
 by Kate Deplaix, review by<br>&nbsp;&nbsp;&nbsp;&nbsp; Nicol=E1s Ojeda B=
=E4r, Kate Deplaix, and Damien Doligez).<br><br>### Bug Fixes:<br><br>&nbsp=
; - #12623 fix the computation of variance composition<br>&nbsp;&nbsp;&nbsp=
; (Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)<b=
r><br>&nbsp; - #12581, #12609: Fix error on uses of packed modules outside =
their pack<br>&nbsp;&nbsp;&nbsp; to correctly handle nested packs<br>&nbsp;=
&nbsp;&nbsp; (Vincent Laviron, report by Javier Ch=E1varri, review by Pierr=
e Chambart)<br><br><br>&nbsp; - #12645, #12649 fix error messages for cycli=
c type definitions in presence of<br>&nbsp;&nbsp;&nbsp; the `-short-paths` =
flag.<br>&nbsp;&nbsp;&nbsp; (Florian Angeletti, report by Vesa Karvonen, re=
view by Gabriel Scherer)<br><br>&nbsp; - #12757](https://github.com/ocaml/o=
caml/issues/12757): Fix ocamlnat (native toplevel) by registering frametabl=
es correctly<br>&nbsp;&nbsp;&nbsp; (Stephen Dolan, Nick Barnes and Mark Shi=
nwell,<br>&nbsp;&nbsp;&nbsp;&nbsp; review by Vincent Laviron and S=E9bastie=
n Hinderer)<br><br>&nbsp; - #12791: `extern` is applied to definitions of `=
caml_builtin_cprim`<br>&nbsp;&nbsp;&nbsp; and `caml_names_of_builtin_cprim`=
 when linking bytecode '-custom'<br>&nbsp;&nbsp;&nbsp; executables with a C=
++ linker.<br>&nbsp;&nbsp;&nbsp; (Shayne Fletcher, review by Antonin D=E9ci=
mo and Xavier Leroy)<br>&nbsp;&nbsp; &nbsp;<br>### GC Performance Regressio=
n Fixes<br><br>&nbsp; - #12318: GC: simplify the meaning of custom_minor_ma=
x_size: blocks with<br>&nbsp;&nbsp;&nbsp; out-of-heap memory above this lim=
it are now allocated directly in<br>&nbsp;&nbsp;&nbsp; the major heap.<br>&=
nbsp;&nbsp;&nbsp; (Damien Doligez, report by Stephen Dolan, review by Gabri=
el Scherer)<br><br>&nbsp; - #12439]: Finalize and collect dead custom block=
s during minor collection<br>&nbsp;&nbsp;&nbsp; (Damien Doligez, review by =
Xavier Leroy, Gabriel Scherer and KC<br>&nbsp;&nbsp;&nbsp; Sivaramakrishnan=
)<br><br>&nbsp; - #12590, #12595: Move `caml_collect_gc_stats_sample` in<br=
>&nbsp;&nbsp;&nbsp; `caml_empty_minor_heap_promote` before barrier arrival.=
<br>&nbsp;&nbsp;&nbsp; (B. Szilvasy, review by Gabriel Scherer)<br><br>&nbs=
p; - #12491, #12493 #12500, #12754: Do not change GC pace when creating sub=
-arrays of bigarrays<br>&nbsp;&nbsp;&nbsp; (Xavier Leroy, report by Ido Yar=
iv, analysis by Gabriel Scherer,<br>&nbsp;&nbsp;&nbsp;&nbsp; review by Gabr=
iel Scherer and Fabrice Buoro)<br><br>### Runtime Bug Fixes<br><br>&nbsp; -=
 #11800, #12707: fix an assertion race condition in `install_backup_thread`=
<br>&nbsp;&nbsp;&nbsp; (Jan Midtgaard, review by Gabriel Scherer)<br><br>&n=
bsp; - #12486, #12535: Fix delivery of unhandled effect exceptions on amd64=
 with<br>&nbsp;&nbsp;&nbsp; --enable-frame-pointers<br>&nbsp;&nbsp;&nbsp; (=
Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)<br><br>&nb=
sp; - #12712, #12742: fix an assertion boundary case in `caml_reset_young_l=
imit`<br>&nbsp;&nbsp;&nbsp; (Jan Midtgaard, review by Guillaume Munch-Macca=
gnoni)<br><br>&nbsp; - #12713, #12715: disable common subexpression elimina=
tion for atomic loads<br>&nbsp;&nbsp;&nbsp; (Gabriel Scherer and Vincent La=
viron,<br>&nbsp;&nbsp;&nbsp;&nbsp; review by Vincent Laviron, KC Sivaramakr=
ishnan and Xavier Leroy,<br>&nbsp;&nbsp;&nbsp;&nbsp; report by Vesa Karvone=
n and Carine Morel)<br><br data-mce-bogus=3D"1"></div></div></body></html>
--=_1d4e8d7c-e721-448d-959a-5bbecc469077--