OCaml 5.2.0 released
Florian Angeletti <[email protected]> Mon, 13 May 2024 16:29:36 +0200 (CEST)
| Newsgroups | gmane.comp.lang.caml.announce |
|---|---|
| Message-ID | <[email protected]> |
--=_f5742199-6837-4d9b-8851-db800dd67f00
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Dear OCaml users,=20
We have the pleasure of celebrating the birthday of Inge Lehmann by announc=
ing the=20
release of OCaml version 5.2.0.=20
Some of the highlights in OCaml 5.2.0 are:=20
- Re-introduced GC compaction=20
GC compaction can now be manually triggered by calling `Gc.compact ()` manu=
ally.=20
This is expected to be particularly useful for programs that wish to releas=
e memory=20
to the operating system after a temporary memory-intensive phase.=20
- Restored native backend for POWER 64 bits=20
With this restored backend, all 64 bits architecture supported in OCaml 4 a=
re=20
supported bin OCaml 5=20
- Thread sanitizer support=20
Thread sanitizer is a dynamic data race detector which instrument memory=20
accesses to detect and explain data races at execution time. Since the=20
instrumentation is costly (with a 2x to 7x slowdown), it must be enabled wi=
th=20
the `ocaml-option-tsan` configuration flag. (The reference manual contains=
=20
more information on how to use TSAN.)=20
- New Dynarray module=20
This new standard library module provides a standard implementation for res=
izeable array,=20
which is guaranteed to be memory safe even in presence of data races.=20
- New -H flag for hidden include directories=20
This new flag makes it possible for build tools to split cleanly dependenci=
es=20
between direct (the dependencies explicitly added by the project) and indir=
ect=20
dependencies (the dependencies introduced by the direct dependencies) witho=
ut=20
the quirks of previous implementations.=20
- Project-wide occurence metadata support for developer tools=20
When compiling a module with the `-bin-annot` and `-bin-annot-occurrences`=
=20
flags, the compiler stores in the `.cmt` file an index of all occurences of=
=20
values, types, modules, ...=20
- Raw identifiers=20
To improve OCaml upward-compatibility, there is a new syntax for lowercase=
=20
identifiers, `let \#if =3D 0`, which works even if the identifier is a keyw=
ord=20
in some OCaml versions. This change has been adopted in OCaml 5.2 in=20
preparation of the introduction of the `effect` keyword in OCaml 5.3=20
- Local open in type expressions=20
Local open are now allowed in type expression: `val (+): Int64.(t -> t -> t=
)`.=20
And a lot of incremental changes:=20
- Around 20 new functions in the standard library besides the new Dynarray =
module=20
(in the `Array`, `Float`, `Format`, `Fun`, `In_channel`, `Out_channel`, and=
`Random` modules )=20
- Many fixes and improvements in the runtime=20
- Many bug fixes=20
OCaml 5.2.0 is still a somewhat experimental release compared to the OCaml=
=20
4.14 branch. In particular=20
- The Windows MSVC port is still unavailable.=20
- Ephemeron performances need to be investigated.=20
- `statmemprof` is being tested in the developer branch of OCaml.=20
- There are a number of known runtime concurrency or GC performance bugs=20
(that trigger under rare circumstances).=20
Since the Windows MSVC port and statmemprof are still missing, the maintena=
nce=20
support for OCaml 4.14 will be extended until at least the end of the year.=
=20
Please report any unexpected behaviours on the OCaml issue tracker (https:/=
/github.com/ocaml/ocaml/issues)=20
and post any questions or comments you might have on our discussion forums =
(https://discuss.ocaml.org).=20
The full list of changes can be found in the changelog below.=20
Happy hacking,=20
=E2=80=94 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.2.0=20
The source code for the release candidate is also directly available on:=20
* GitHub: https://github.com/ocaml/ocaml/archive/5.2.0.tar.gz=20
* OCaml archives at Inria: https://caml.inria.fr/pub/distrib/ocaml-5.2/ocam=
l-5.2.0.tar.gz=20
Fine-Tuned Compiler Configuration=20
----------------------------------------------=20
If you want to tweak the configuration of the compiler, you can switch to t=
he option variant with:=20
opam update=20
opam switch create <switch_name> ocaml-variants.5.1.0+options <option_list>=
=20
where `<option_list>` is a qpace separated list of `ocaml-option-*` package=
s. For instance, for a `flambda` and `no-flat-float-array` switch:=20
opam switch create 5.2.0+flambda+nffa ocaml-variants.5.2.0+options ocaml-op=
tion-flambda ocaml-option-no-flat-float-array=20
Changes in OCaml 5.2.0 (13 May 2024)=20
------------------------------------=20
(Changes that can break existing programs are marked with a "*")=20
### Restored backends:=20
- #12276, #12601: native-code compilation for POWER (64 bits, little-endian=
)=20
(Xavier Leroy, review by KC Sivaramakrishnan, Anil Madhavapeddy,=20
and Stephen Dolan)=20
- #12667: extend the latter to POWER 64 bits, big-endian, ELFv2 ABI=20
(A. Wilcox, review by Xavier Leroy)=20
### Runtime system:=20
- #12193: Re-introduce GC compaction for shared pools=20
Adds a parallel compactor for the shared pools (which contain major heap=20
blocks sized less than 128 words). Explicit only for now, on calls to=20
`Gc.compact`.=20
(Sadiq Jaffer, Nick Barnes, review by Anil Madhavapeddy, Damien Doligez,=20
David Allsopp, Miod Vallat, Artem Pianykh, Stephen Dolan, Mark Shinwell=20
and KC Sivaramakrishnan)=20
- #12114: Add ThreadSanitizer support=20
(Fabrice Buoro and Olivier Nicole, based on an initial work by Anmol Sahoo,=
=20
review by Damien Doligez, S=C3=A9bastien Hinderer, Jacques-Henri Jourdan, L=
uc=20
Maranget, Guillaume Munch-Maccagnoni, Gabriel Scherer)=20
- #12850: Update Gc.quick_stat data at the end of major cycles and compacti=
on=20
This PR adds an additional caml_collect_gc_stats_sample_stw to the major he=
ap=20
cycling stw. This means that Gc.quick_stat now actually reflects the state =
of=20
the heap after a major cycle or compaction.=20
(Sadiq Jaffer, review by Miod Vallat and Gabriel Scherer)=20
- #12859: Ensure Gc.compact does a full major before the compactor runs=20
(Sadiq Jaffer, review by Leo White, Mark Shinwell, Gabriel Scherer,=20
Josh Berdine, David Allsopp and KC Sivaramakrishnan)=20
- #10111: Increase the detail of location information for debugging events =
to=20
allow the end line number and character offset to be reported.=20
(David Allsopp, review by Nick Barnes, Enguerrand Decorne and Stephen Dolan=
)=20
- #10403, #12202: introduce `caml_ext_table_add_noexc` that does not=20
raise `Out_of_memory` exceptions and use it inside the blocking sections=20
of `caml_read_directory`. Also, check for overflows in ext table sizes.=20
(Xavier Leroy, report by Arseniy Alekseyev, review by Gabriel Scherer)=20
- #11332, #12702: make sure `Bool_val(v)` has type `bool` in C++=20
(Xavier Leroy, report by ygrek, review by Gabriel Scherer)=20
- #12772, #12787: Avoid using _Bool in public headers for the sake of C++=
=20
compatibility=20
(Guillaume Munch-Maccagnoni, report by KC Sivaramakrishnan, review=20
by Xavier Leroy and KC Sivaramakrishnan)=20
- #12223: Constify constructors and flags tables in C code. Now these=20
tables will go in the readonly segment, where they belong.=20
(Antonin D=C3=A9cimo, review by Gabriel Scherer and Xavier Leroy)=20
- #12234: make instrumented time calculation more thread-safe on macOS.=20
(Anil Madhavapeddy, review by Daniel B=C3=BCnzli and Xavier Leroy)=20
- #12235, #12468: introduce and use the `CAMLnoret` macro as=20
a lighter alternative to `CAMLnoreturn_start` / `CAMLnoreturn_end`.=20
Implement it so as to conform with C11, C23, C++11, C++17.=20
(Xavier Leroy and Dhruv Maroo, with help from Antonin D=C3=A9cimo, review b=
y=20
Gabriel Scherer and David Allsopp)=20
- #12275: caml/stack.h: more abstract macros to describe OCaml stacks and=
=20
how to traverse them, supporting more stack layouts.=20
(Xavier Leroy, review by KC Sivaramakrishnan and Fabrice Buoro)=20
- #12268: deliver `Out_of_memory` exception if domain creation fails=20
due to memory resource exhaustion. It was previous always a `Failure`.=20
(Anil Madhavapeddy, review by David Allsopp)=20
- #12300, #12314: Discard out_channel buffered data on permanent I/O error=
=20
(Xavier Leroy, report by T=C3=B6r=C3=B6k Edwin, review by Anil Madhavapeddy=
=20
and Nicol=C3=A1s Ojeda B=C3=A4r)=20
- #11386: Simplifications and fixes to multicore systhreads implementation.=
=20
(Guillaume Munch-Maccagnoni, review by Anil Madhavapeddy and KC=20
Sivaramakrishnan)=20
- #12875, #12879, #12882: Execute preemptive systhread switching as a=20
delayed pending action. This ensures that one can reason within the=20
FFI that no mutation happens on the same domain when allocating on=20
the OCaml heap from C, consistently with OCaml 4. This also fixes=20
further bugs with the multicore systhreads implementation.=20
(Guillaume Munch-Maccagnoni, bug reports and suggestion by Mark=20
Shinwell, review by Nick Barnes and Stephen Dolan)=20
- #12408: `Domain.spawn` no longer leaks its functional argument for=20
the whole duration of the children domain lifetime.=20
(Guillaume Munch-Maccagnoni, review by Gabriel Scherer)=20
- #12409: Fix unsafety and deadlocks should an asynchronous exception=20
arise at specific locations during domain creation and shutdown.=20
(Guillaume Munch-Maccagnoni, review by Gabriel Scherer)=20
- #11911, #12381: Restore statmemprof functionality in part, with=20
some API changes in Gc.Memprof.=20
(Nick Barnes, review by Jacques-Henri Jourdan=20
and Guillaume Munch-Maccagnoni).=20
- #12430: Simplify dynamic bytecode loading in Meta.reify_bytecode=20
(Stephen Dolan, review by S=C3=A9bastien Hinderer, Vincent Laviron and Xavi=
er=20
Leroy)=20
- #12489: Fix an error-handling bug in caml_alloc_sprintf=20
(Stephen Dolan, report by Chris Casinghino, review by Jeremy Yallop=20
and Xavier Leroy)=20
- #11307: Finish adapting the implementation of asynchronous actions for=20
multicore: soundness, liveness, and performance issues.=20
Do not crash if a signal handler is called from an unregistered C=20
thread, and other possible soundness issues. Prevent issues where join=20
on other domains could make the toplevel unresponsible to Ctrl-C. Avoid=20
needless repeated polling in C code when callbacks cannot run=20
immediately.=20
(Guillaume Munch-Maccagnoni, review by Enguerrand Decorne, Xavier=20
Leroy, and KC Sivaramakrishnan)=20
- #12634: Simplify TSan backtrace bookkeeping upon raise=20
(Olivier Nicole and Fabrice Buoro, review by Gabriel Scherer)=20
* #12686: Some primitives had the wrong types to be callable from the bytec=
ode=20
interpreter. Either fix their types, mark them as `CAMLexport` instead of=
=20
`CAMLprim`, or remove them entirely if no longer used.=20
(Xavier Leroy, review by David Allsopp)=20
- #12700, continuing #11763 and trying to address #12660:=20
Use the correct types for primitives when generating the table of primitive=
s=20
used by ocamlrun.=20
(Xavier Leroy, motivation, review and improvements by Antonin D=C3=A9cimo)=
=20
- #12345, #12710: Fix issues with finaliser orphaning at domain termination=
=20
(KC Sivaramakrishnan, report by Gabriel Scherer, review by Gabriel Scherer,=
=20
Sadiq Jaffer and Fabrice Buoro)=20
- #12599: Refactor Dynlink startup to avoid parsing bytecode sections twice=
=20
(Stephen Dolan, review by David Allsopp, Hugo Heuzard, Damien Doligez and=
=20
Xavier Leroy)=20
- #12678, #12898: free channel buffers on close rather than on finalization=
=20
(Damien Doligez, review by Jan Midtgaard and Gabriel Scherer, report=20
by Jan Midtgaard)=20
- #12681: Fix TSan false positives due to volatile write handling=20
(Olivier Nicole, Fabrice Buoro and Anmol Sahoo, review by Luc Maranget,=20
Gabriel Scherer, Hernan Ponce de Leon and Xavier Leroy)=20
- #12743: Use pthread_sigmask instead of sigprocmask=20
Updates usage of sigprocmask to pthread_sigmask in otherlibs/unix.=20
(Max Slater, review by Miod Vallat and Xavier Leroy)=20
- #12769: Unify MSVC and MinGW-w64 code paths, by always using WinAPI=20
directly.=20
(David Allsopp, Antonin D=C3=A9cimo, and Samuel Hym, review by Nicolas=20
Ojeda Bar)=20
- #11911, #12382, #12383: Restore statmemprof functionality in part=20
(backtrace buffers, per-thread and per-domain data structures,=20
GC/allocation interface). (Nick Barnes, review by Gabriel Scherer,=20
Fabrice Buoro, Sadiq Jaffer, Guillaume Munch-Maccagnoni, and=20
Jacques-Henri Jourdan).=20
- #12735: Store both ends of the stack chain in continuations=20
(Leo White, review by Miod Vallat and KC Sivaramakrishnan)=20
- #12746: Simplify and clean up TSan annotations=20
(Olivier Nicole, review by Miod Vallat and Fabrice Buoro)=20
- #12809: Add ThreadSanitizer support to FreeBSD/amd64=20
(Miod Vallat, review by Gabriel Scherer)=20
- #12810: Port ThreadSanitizer support to Linux and macOS on arm64=20
(Miod Vallat, review by Tim McGilchrist)=20
- #12811: Define and use the CAMLthread_local macro for TLS variables.=20
(Antonin D=C3=A9cimo and Samuel Hym, review by Miod Vallat and Xavier Leroy=
)=20
- #12814: More detailed failure messages from `input_value` and `Marshal.fr=
om_*`=20
(Xavier Leroy, review by Stephen Dolan and Anil Madhavapeddy)=20
- #12815: Correctly format multi-line locations in exception backtraces, in=
the=20
style that the compiler driver uses.=20
(David Allsopp, review by Gabriel Scherer)=20
- #12773, #12830, #12834: Rewrite `caml_c_thread_(un)register` to fix=20
various bugs.=20
(Guillaume Munch-Maccagnoni, reported by Miod Vallat, suggested by=20
Hari Hara Naveen S, reviewed by Fabrice Buoro, Gabriel Scherer and=20
Miod Vallat)=20
- #12876: Port ThreadSanitizer support to Linux on POWER=20
(Miod Vallat, review by Tim McGilchrist)=20
- #12886: Reinitialize IO mutexes after fork=20
(Max Slater, review by Guillaume Munch-Maccagnoni and Xavier Leroy)=20
- #12907: Port ThreadSanitizer support to Linux on RiscV=20
(Miod Vallat, review by Nicol=C3=A1s Ojeda B=C3=A4r and Fabrice Buoro)=20
- #12915: Port ThreadSanitizer support to Linux on s390x=20
(Miod Vallat, review by Tim McGilchrist)=20
- #12934: Fix data races between marking and sweeping functions=20
(Olivier Nicole, suggested by Stephen Dolan, review by Gabriel Scherer,=20
Miod Vallat and Damien Doligez)=20
### Language features:=20
- #12295, #12568: Give `while true' a polymorphic type, similarly to=20
`assert false'=20
(Jeremy Yallop, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer,=
=20
suggestion by Rodolphe Lepigre and John Whitington)=20
- #12044: Add local module open syntax for types.=20
```=20
module A =3D struct=20
type t =3D int=20
type r =3D unit=20
type s =3D string=20
end=20
type example =3D A.(t * r * s)=20
```=20
(Alistair O'Brien, review by Gabriel Scherer, Nicol=C3=A1s Ojeda B=C3=A4r=
=20
and Florian Angeletti)=20
- #11252, RFC 27: Support raw identifier syntax \#foo=20
(Stephen Dolan, review by David Allsopp, Gabriel Scherer and Olivier Nicole=
)=20
- #12315: Use type annotations from arguments in let rec=20
(Stephen Dolan, review by Gabriel Scherer)=20
- #12375: allow use of [@untagged] for all immediate types like char, bool,=
=20
and variant with only constant constructors.=20
(Christophe Raffalli, review by Gabriel Scherer)=20
* #12502: the compiler now normalizes the newline sequence \r\n to=20
a single \n character during lexing, to guarantee that the semantics=20
of newlines in string literals is not modified by Windows tools=20
transforming \n into \r\n in source files.=20
Warning 29 [eol-in-string] is not emitted anymore, as the normalization=20
gives a more robust semantics to newlines in string literals.=20
(Gabriel Scherer and Damien Doligez, review by Daniel B=C3=BCnzli, David=20
Allsopp, Andreas Rossberg, Xavier Leroy, report by Andreas Rossberg)=20
### Standard library:=20
- #11563: Add the Dynarray module to the stdlib. Dynamic arrays are=20
arrays whose length can be changed by adding or removing elements at=20
the end, similar to 'vectors' in C++ or Rust.=20
(Gabriel Scherer, Simon Cruanes and Florian Angeletti, review by=20
Daniel B=C3=BCnzli, Guillaume Munch-Maccagnoni, Cl=C3=A9ment Allain,=20
Damien Doligez, Wiktor Kuchta and Pieter Goetschalckx)=20
- #12716: Add `Format.pp_print_nothing` function.=20
(L=C3=A9o Andr=C3=A8s, review by Gabriel Scherer and Nicol=C3=A1s Ojeda B=
=C3=A4r)=20
* #6732, #12423: Make Buffer.add_substitute surjective and fix its=20
documentation.=20
(Damien Doligez, review by Antonin D=C3=A9cimo)=20
* #10775, #12499: Half-precision floating-point elements in Bigarray.=20
(Anton Yabchinskiy, review by Xavier Leroy and Nicol=C3=A1s Ojeda B=C3=A4r)=
=20
- #11517, #12477: Expose pp_infinity in interface of the format module, and=
=20
check that margin is less than pp_infinity when setting or checking geometr=
y.=20
(Janith Petangoda, reported by Simmo Saan, reviewed by Florian Angeletti,=
=20
Simmo Saan, Josh Berdine and Gabriel Scherer)=20
- #12217: Add `Array.shuffle`.=20
(Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r, David Allsopp a=
nd Alain Frisch)=20
- #12212: Add cache-aligned constructor for atomics. The patch ensures that=
=20
all allocations (of the right size) in the shared heap are aligned.=20
(Bartosz Modelski with Gabriel Scherer, Guillaume Munch-Maccagnoni,=20
Xavier Leroy, review by Alain Frisch, Anil Madhavapeddy, Gabriel Scherer,=
=20
Guillaume Munch-Maccagnoni, KC Sivaramakrishnan, Stefan Muenzel,=20
Xavier Leroy)=20
- #12307: Add BLAKE2b hashing and an MD5 submodule to the Digest module.=20
(Xavier Leroy, review by Olivier Nicole, Gabriel Scherer, Wiktor Kuchta,=20
Daniel B=C3=BCnzli, David Allsopp)=20
- #12365: Add In_channel.input_bigarray, In_channel.really_input_bigarray,=
=20
Out_channel.output_bigarray, Unix.read_bigarray, Unix.write_bigarray,=20
Unix.single_write_bigarray.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Jeremy Yallop, Xavier Leroy, Gabrie=
l Scherer,=20
David Allsopp)=20
- #12455: Add `Array.init_matrix`, `Float.Array.make_matrix`,=20
`Float.Array.init_matrix`.=20
(Glen M=C3=A9vel, review by Xavier Leroy, Gabriel Scherer, Jeremy Yallop,=
=20
Nicolas Ojeda Bar)=20
* #12455: `Array.make_matrix dimx dimy f` now raises `Invalid_argument`=20
when `dimx =3D 0 && dimy < 0` This was already specified but not enforced.=
=20
(Glen M=C3=A9vel, report by Jeremy Yallop, review by Nicolas Ojeda Bar)=20
- #12459: Add `Random.int_in_range`, `Random.int32_in_range`,=20
`Random.int64_in_range`, `Random.nativeint_in_range`,=20
and their counterpart in `Random.State`.=20
(Glen M=C3=A9vel and Xavier Leroy, review by Gabriel Scherer, Xavier Leroy,=
=20
Florian Angeletti)=20
- #12459: `Random`: restore compatibility between 32-bit integers (JavaScri=
pt)=20
and 63-bit integers (64-bit OCaml).=20
For `Random.full_int` this was guaranteed in 4.14 but wrongly removed in 5.=
0.=20
(Xavier Leroy, review by Glen M=C3=A9vel)=20
- #12511: Minor performance improvements and cleanups in the implementation=
=20
of modules Int32, Int64, and Nativeint=20
(Xavier Leroy, review by Gabriel Scherer and Daniel B=C3=BCnzli)=20
- #12558: Adapt GC alarms for multicore and fix their documentation.=20
(Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan=20
and Gabriel Scherer)=20
- #12625: Remove the Closure module from Obj=20
(Vincent Laviron, review by Xavier Leroy)=20
- #12758, #12998: Remove the `Marshal.Compression` flag to the=20
`Marshal.to_*` functions. The compilers are still able to use=20
ZSTD compression for compilation artefacts.=20
This is a forward port and clean-up of the emergency fix that was introduce=
d=20
in OCaml 5.1.1 by #12734.=20
(Xavier Leroy, review by Damien Doligez)=20
- #12784: Fix computation of minor-heap allocation in Gc.counters()=20
and Gc.allocated_bytes(). (Nick Barnes, review by Gabriel Scherer)=20
- #12770: Add `Fun.compose`.=20
(Justin Frank, review by Nicol=C3=A1s Ojeda B=C3=A4r, Daniel B=C3=BCnzli an=
d Jeremy Yallop)=20
- #12845: Add `{In,Out}_channel.is_binary_mode` as the dual of=20
`set_binary_mode`. This function was previously only available in the inter=
nal=20
C API.=20
(David Allsopp, review by Nicol=C3=A1s Ojeda B=C3=A4r and Xavier Leroy)=20
### Type system:=20
- #12313, #11799: Do not re-build as-pattern type when a ground type annota=
tion=20
is given. This allows to work around problems with GADTs in as-patterns.=20
(Jacques Garrigue, report by Leo White, review by Gabriel Scherer)=20
### Code generation and optimizations:=20
- #11239: on x86-64 and RISC-V, reduce alignment of OCaml stacks from 16 to=
8.=20
This reduces stack usage. It's only C stacks that require 16-alignment.=20
(Xavier Leroy, review by Gabriel Scherer and Stephen Dolan)=20
- #12311: on POWER, 32-bit FP numbers stored in memory (e.g. in bigarrays)=
=20
were not correctly rounded sometimes.=20
(Xavier Leroy, review by Anil Madhavapeddy and Tim McGilchrist)=20
- #12551, #12608, #12782, #12596: Overhaul of recursive value compilation.=
=20
Non-function recursive bindings are now forbidden from Lambda onwards,=20
and compiled using a new Value_rec_compiler module.=20
(Vincent Laviron and Lunia Ayanides, review by Gabriel Scherer,=20
Stefan Muenzel and Nathana=C3=ABlle Courant)=20
- #1809, #12181: rewrite `compare x y op 0` to `x op y` when values are int=
egers=20
(Xavier Clerc, Stefan Muenzel, review by Gabriel Scherer and Vincent Laviro=
n)=20
- #12825: disable common subexpression elimination for atomic loads... agai=
n.=20
(Gabriel Scherer, review by KC Sivaramakrishnan, Xavier Leroy=20
and Vincent Laviron, report by Vesa Karvonen)=20
### Other libraries:=20
- #12213: Dynlink library, improve legibility of error messages=20
(Samuel Hym, review by Gabriel Scherer and Nicol=C3=A1s Ojeda B=C3=A4r)=20
* #12686: Runtime_events library, C API: define=20
`caml_runtime_events_{start,pause,resume}` as returning `void`=20
instead of `value`.=20
(Xavier Leroy, review by David Allsopp)=20
### Compiler user-interface and warnings:=20
- #11989, #12246, RFC 31: New flag, -H, to allow for transitive dependencie=
s=20
without including them in the initial environment.=20
(Chris Casinghino, Fran=C3=A7ois Bobot, and Gabriel Scherer, review by Leo =
White=20
and Stefan Muenzel, RFC by Fran=C3=A7ois Bobot)=20
* #10613, #12405: Simplify the values used for the system variable (`system=
:` in=20
`ocamlopt -config` or the `Config.system` constant). In particular, s390x a=
nd=20
ppc64 now report "linux" instead of "elf"; all variants of 32-bit ARM on Li=
nux=20
now report "linux"; OpenBSD now reports "openbsd" instead of "bsd" for 32-b=
it=20
ARM; FreeBSD, NetBSD and OpenBSD now report the same value for both x86_64 =
and=20
x86_32; x86_32 systems matching *bsd but not freebsd*, netbsd* or openbsd*=
=20
are no longer identified (as on x86_64); x86_32 Linux now reports "linux"=
=20
instead of "linux_elf".=20
(David Allsopp, request by Kate Deplaix, review by S=C3=A9bastien Hinderer =
and=20
Xavier Leroy)=20
- #12247: configure: --disable-ocamldebug can now be used instead=20
of --disable-debugger (which remains available for compatibility)=20
(Gabriel Scherer, review by Damien Doligez and S=C3=A9bastien Hinderer)=20
- #12199: improve the error message for non-overriding `inherit!`=20
(Florian Angeletti, review by Jules Aguillon)=20
- #12210: uniform style for inline code in compiler messages=20
(Florian Angeletti, review by Gabriel Scherer)=20
* #12278, #:12325: Remove the OCAML_FLEXLINK environment variable from the=
=20
compiler drivers. This environment variable was previously used as part of =
the=20
FlexDLL bootstrap procedure and existed solely for that purpose. Its remova=
l=20
greatly simplifies both the build system and testsuite machinery.=20
(David Allsopp, review by S=C3=A9bastien Hinderer)=20
- #12347: error messages: always report missing polyvariant tags=20
(Florian Angeletti, report by Tianbo Hao, review by Gabriel Scherer)=20
- #12224, specialized error message when trying to apply non-functor=20
module (e.g `module M =3D Int(Int)`)=20
(Florian Angeletti, review by Gabriel Scherer)=20
- #12451: Warning 53 (misplaced attributes) now works for all attributes.=
=20
(Chris Casinghino, review by Florian Angeletti)=20
- #12622: Give hints about existential types appearing in error messages=20
(Leo White, review by Gabriel Scherer and Florian Angeletti)=20
- #12671: When a class type parameter or class parameter does not match,=20
identify which parameter in the error message, instead of saying=20
"A type parameter" or "A parameter".=20
(Stefan Muenzel, review by Gabriel Scherer)=20
- #12679: Add more detail to the error message and manual in case of=20
invalid module type substitutions.=20
(Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)=20
- #12750: Display the command executed to extract primitives in=20
`ocamlc -verbose`.=20
(David Allsopp, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20
- #12777: Add details about the actual and expected method types to the met=
hod=20
mismatch error messages.=20
(Javier Ch=C3=A1varri, review by Gabriel Scherer and Florian Angeletti)=20
* #12942: Fix an line ordering in some module inclusion error messages=20
(Nick Roberts, review by Florian Angeletti, report by Carl Eastlund)=20
### Manual and documentation:=20
- #12338: clarification of the documentation of process related function in=
=20
the unix module regarding the first element of args and shell's pid.=20
(Christophe Raffalli, review by Florian Angeletti)=20
- #12473: Document in runtime/memory.c our current understanding of=20
accesses to the OCaml heap from the C runtime code -- the problem=20
of hybrid programs mixing two memory models.=20
(Gabriel Scherer and Guillaume Munch-Maccagnoni, review by Olivier=20
Nicole and Xavier Leroy)=20
- #12456: Document the incompatibility between effects on the one=20
hand, and `caml_callback` and asynchronous callbacks (signal=20
handlers, finalisers, memprof callbacks...) on the other hand.=20
(Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan)=20
- #12694: Document in runtime/tsan.c the TSan instrumentation choices and t=
he=20
consequences with regard to the memory model.=20
(Olivier Nicole, review by Miod Vallat, Gabriel Scherer, Guillaume=20
Munch-Maccagnoni and Fabrice Buoro)=20
- #12802: Add manual chapter about ThreadSanitizer support=20
(Olivier Nicole, review by Miod Vallat, Sebastien Hinderer, Fabrice Buoro,=
=20
Gabriel Scherer and KC Sivaramakrishnan)=20
- #12819: Clarify which runtime interactions are allowed in custom ops=20
(Basile Cl=C3=A9ment, review by Guillaume Munch-Maccagnoni and Xavier Leroy=
)=20
- #12840: manual: update runtime tracing chapter for custom events (ex #123=
35)=20
(Lucas Pluvinage, Sadiq Jaffer and Olivier Nicole, review by Gabriel Schere=
r,=20
David Allsopp, Tim McGilchrist and Thomas Leonard)=20
- #13066, update OCAMLRUNPARAM documentation for the stack size parameter l=
=20
(Florian Angeletti, review by Nicol=C3=A1s Ojeda B=C3=A4r, Tim McGilchrist,=
and=20
Miod Vallat)=20
- #13078: update Format tutorial on structural boxes to mention alignment=
=20
questions.=20
(Edwin T=C3=B6r=C3=B6k, review by Florian Angeletti)=20
- #13092: document the existence of the `[@@poll error]` built-in attribute=
=20
(Florian Angeletti, review by Gabriel Scherer)=20
### Tools:=20
- #12340: testsuite: collect known issues with current -short-paths=20
implementation for existential types=20
(Florian Angeletti, Samuel Hym, review by Florian Angeletti and Thomas Refi=
s)=20
- #12147: ocamllex: Allow carriage returns at the end of line directives.=
=20
(SeungCheol Jung, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20
- #12260: Fix invalid_argument on some external or module aliases in ocamln=
at=20
(Fabian Hemmer, review by Vincent Laviron)=20
- #12185: New script language for ocamltest.=20
(Damien Doligez with Florian Angeletti, S=C3=A9bastien Hinderer, Gabriel Sc=
herer,=20
review by S=C3=A9bastien Hinderer and Gabriel Scherer)=20
- #12371: ocamltest: fix recursive expansion of variables.=20
(Antonin D=C3=A9cimo, Damien Doligez, review by S=C3=A9bastien Hinderer,=20
Damien Doligez, Gabriel Scherer, and Xavier Leroy)=20
* #12497, #12613: Make ocamlc/ocamlopt fail with an error when no=20
input files are specified to build an executable.=20
(Antonin D=C3=A9cimo, review by S=C3=A9bastien Hinderer)=20
- #12576: ocamldep: various refactors.=20
(Antonin D=C3=A9cimo, review by Florian Angeletti, Gabriel Scherer, and L=
=C3=A9o Andr=C3=A8s)=20
- #12615: ocamldoc: get rid of the odoc_literate and odoc_todo generators.=
=20
(S=C3=A9baistien Hinderer, review by Gabriel Scherer and Florian Angeletti)=
=20
- #12624: Use $XDG_CONFIG_DIRS in addition to $XDG_CONFIG_HOME when searchi=
ng=20
for init.ml and use this to extend init.ml support to the toplevel when=20
running on Windows.=20
(David Allsopp, report by Jonah Beckford, review by Nicol=C3=A1s Ojeda B=C3=
=A4r and=20
Antonin D=C3=A9cimo)=20
- #12688: Setting the env variable `NO_COLOR` with an empty value no longer=
=20
has effects. Previously, setting `NO_COLOR` with any value, including=20
the empty value, would disable colors (unless `OCAML_COLOR` is also set).=
=20
After this change, the user must set `NO_COLOR` with an non-empty value=20
to disable colors. This reflects a specification clarification/change=20
from the upstream website at https://no-color.org.=20
(Favonia, review by Gabriel Scherer)=20
- #12744: ocamltest: run tests in recursive subdirs more eagerly=20
(Nick Roberts, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20
- #12901, 12908: ocamllex: add overflow checks to prevent generating incorr=
ect=20
lexers; use unsigned numbers in the table encoding when possible.=20
(Vincent Laviron, report by Edwin T=C3=B6r=C3=B6k, review by Xavier Leroy)=
=20
### Internal/compiler-libs changes:=20
- #12508 : Add compiler-side support for project-wide occurrences in Merlin=
, by=20
generating index tables of all identifier occurrences. This extra data in .=
cmt=20
files is only added when the new flag -bin-annot-occurrences is passed.=20
(Ulysse G=C3=A9rard, Nathana=C3=ABlle Courant, suggestions by Gabriel Scher=
er and Thomas=20
Refis, review by Florian Angeletti, Gabriel Scherer and Thomas Refis)=20
- #12236, #12386, #12391, #12496, #12673: Use syntax as sole determiner of =
arity=20
This changes function arity to be based solely on the source program's=20
parsetree. Previously, the heuristic for arity had more subtle heuristics=
=20
that involved type information about patterns. Function arity is important=
=20
because it determines when a pattern match's effects run and is an input=20
into the fast path for function application.=20
This change affects tooling: it changes the function constructs in parsetre=
e=20
and typedtree.=20
See https://github.com/ocaml/RFCs/pull/32 for the original RFC.=20
(Nick Roberts; review by Richard Eisenberg, Leo White, and Gabriel Scherer;=
=20
RFC by Stephen Dolan)=20
- #12639: parsing: Attach a location to the RHS of Ptyp_alias=20
and improve the 'alias type mismatch' error message.=20
(Jules Aguillon, review by Florian Angeletti)=20
- #12447: Remove 32-bit targets from X86_proc.system=20
(Masanori Ogino, review by David Allsopp)=20
- #12216, #12248: Prevent reordering of atomic loads during instruction=20
scheduling. This is for reference, as instruction scheduling is currently=
=20
unused in OCaml 5.=20
(Xavier Leroy, report by Luc Maranget and KC Sivaramakrishnan,=20
review by Nicol=C3=A1s Ojeda B=C3=A4r)=20
- #12025: Split Typecore.unify_pat_types into two=20
to avoid unnecessary references to the environment in type_pat=20
(Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)=20
- #12031: Use dedicated types to represent names of compilation units=20
and predefined exceptions in CMO files.=20
(S=C3=A9bastien Hinderer, review by Florian Angeletti, Thomas Refis,=20
Gabriel Scherer, Vincent Laviron, Pierre Chambart, Luke Maurer,=20
Hugo Heuzard, Xavier Leroy and Damien Doligez)=20
- #12109: Pack parameters to unification in unification_environment=20
(Takafumi Saikawa and Jacques Garrigue, review by Richard Eisenberg)=20
- #12331, #12361: Pack the unification data for pattern checking in Typecor=
e=20
(Takafumi Saikawa and Jacques Garrigue,=20
review by Gabriel Scherer, Thomas Refis and Florian Angeletti)=20
- #12229: Remove global mutable state for typechecking patterns=20
in Typecore in favor of local mutable state.=20
(Nick Roberts, review by Takafumi Saikawa)=20
- #12542: Minor bugfix to #12236: restore dropped call to `instance`=20
(Nick Roberts, review by Jacques Garrigue)=20
- #12242: Move the computation of stack frame parameters to a separate=20
`Stackframe` module, and save the parameters in the results of the=20
`Linearize` pass=20
(Xavier Leroy, review by KC Sivaramakrishnan and Mark Shinwell)=20
- #12442: document jump summaries in the pattern-matching compiler=20
(Gabriel Scherer and Thomas Refis, review by Florian Angeletti=20
and Vincent Laviron)=20
- #12446, #12792: remove the hooks machinery around channel locking=20
in runtime/io.c=20
(Gabriel Scherer, review by Xavier Leroy)=20
- #12389, #12544, #12984, #12987: centralize the handling of metadata for=
=20
compilation units and artifacts in preparation for better unicode support f=
or=20
OCaml source files.=20
(Florian Angeletti, review by Vincent Laviron and Gabriel Scherer)=20
- #12532, #12553: improve readability of the pattern-matching debug output=
=20
(Gabriel Scherer, review by Thomas Refis)=20
- #12537: Use C11/C++11 standard static assertion.=20
(Antonin D=C3=A9cimo, review by Sebastien Hinderer, Xavier Leroy,=20
and KC Sivaramakrishnan)=20
- #12169: runtime: document and enforce naming conventions around STW secti=
ons.=20
(Gabriel Scherer, review by Enguerrand Decorne, Miod Vallat, B. Szilvasy=20
and Nick Barnes, report by KC Sivaramakrishnan)=20
- #12669 : Clean up some global state handling in schedgen=20
(Stefan Muenzel, review by Miod Vallat and Gabriel Scherer)=20
- #12640: Make the module separator used in symbol names configurable=20
(Miod Vallat, review by Hugo Heuzard and Xavier Leroy)=20
- #12691 : Clean up Ctype.expand_abbrev_gen and=20
rename Env.add_local_type to add_local_constraint=20
(Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)=20
- #12786 : Clean up the algorithm of Ctype.limited_generalize=20
(Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer)=20
- #10691: Ast_mapper, Ast_iterator: add functions directive_argument,=20
toplevel_directive and toplevel_phrase.=20
(Guillaume Petiot, review by Gabriel Scherer and Kate Deplaix)=20
- #12764: Move all installable headers in `caml/` sub-directories.=20
(Antonin D=C3=A9cimo, review by Gabriel Scherer and David Allsopp)=20
- #12914: Slightly change the s390x assembly dialect in order to build with=
=20
Clang's integrated assembler.=20
(Miod Vallat, review by Gabriel Scherer)=20
- #13001: do not read_back entire shapes to get aliases' uids when building=
the=20
usages index=20
(Ulysse G=C3=A9rard, review by Gabriel Scherer and Nathana=C3=ABlle Courant=
)=20
### Build system:=20
- #12198, #12321, #12586, #12616, #12706, #13048: continue the merge of the=
=20
sub-makefiles into the root Makefile started with #11243, #11248,=20
#11268, #11420 and #11675.=20
(S=C3=A9bastien Hinderer, review by David Allsopp and Florian Angeletti)=20
- #12569, #12570: remove 'otherlibraries' as a prerequisite for 'runtop';=
=20
use 'runtop-with-otherlibs' to use a library from otherlibs/=20
(Gabriel Scherer, review by S=C3=A9bastien Hinderer, suggestion by David Al=
lsopp)=20
- #12652: Make magic numbers easier to bump and duplicate.=20
(S=C3=A9bastien Hinderer, review by Antonin D=C3=A9cimo, David Allsopp and =
Florian=20
Angeletti)=20
* #12751: --with-target-bindir configure option implemented. This option=20
refers to the location of the runtime binaries on the target system for a=
=20
cross-compiler and is embedded in executables produced by ocamlc. It does=
=20
not affect the bytecode executables installed as part of the build. The old=
=20
mechanism `make TARGET_BINDIR=3D..` no longer works.=20
(David Allsopp, review by Damien Doligez, Xavier Leroy and Olivier Nicole)=
=20
- #12768, #13030: Detect mingw-w64 coupling with GCC or LLVM, detect clang-=
cl,=20
and fix C compiler feature detection on macOS.=20
(Antonin D=C3=A9cimo, review by Miod Vallat and S=C3=A9bastien Hinderer)=20
### Bug fixes:=20
- #10652, #12720: fix evaluation order in presence of optional arguments=20
(Jacques Garrigue, report by Leo White, review by Vincent Laviron)=20
- #12595, #12597: fix a race in `caml_clear_gc_stats_sample`=20
(Gabriel Scherer, review by B. Szilvasy, report by B. Szilvasy)=20
- #12580: Fix location of alias pattern variables.=20
(Chris Casinghino, review Gabriel Scherer, report by Milo Davis)=20
- #12583: Add a closing event for when `EV_MAJOR_EPHE_MARK` is complete=20
(Sudha Parimala, review by Gabriel Scherer)=20
- #12566: caml_output_value_to_malloc wrongly uses `caml_stat_alloc`=20
instead of `malloc` since 4.06, breaking (in pooled mode) user code=20
that uses `free` on the result. Symmetrically,=20
caml_input_value_from_malloc should use `free`.=20
(Gabriel Scherer, review by Xavier Leroy and Enguerrand Decorne,=20
report by Ido Yariv)=20
- #12490: Unix: protect the popen_processes hashtable with a mutex=20
(Gabriel Scherer, report by Olivier Nicole, review by Xavier Leroy)=20
- #11931: Fix tricky typing bug with type substitutions=20
(Stephen Dolan, review by Leo White and Jacques Garrigue)=20
- #12037, #12171: Fix get_extern_state potential NULL dereference.=20
(Alexander Skvortsov, report by T=C3=B6r=C3=B6k Edwin,=20
design by Gabriel Scherer, Xavier Leroy)=20
- #12635: Fix get_intern_state potential NULL dereference.=20
(Antonin D=C3=A9cimo, review by KC Sivaramakrishnan)=20
- #12032, #12059: Bug fixes related to compilation of recursive definitions=
=20
(Vincent Laviron, report by Victoire Noizet, review by Gabriel Scherer)=20
* #12145: Loopy constraints cause ocamlc to loop.=20
Fixed by completely removing the call to `update_type` in=20
`Typedecl.transl_type_decl`, as the expansion is already checked by=20
`check_regularity`. As a result, recursion is more polymorphic,=20
which may cause some (essentially wrong) type declarations to have=20
unbound type variables, and some constraints unrelated to the concrete=20
type to be ignored (see tests/typing-misc/constraints.ml).=20
(Jacques Garrigue, report by Richard Eisenberg, review by Leo White)=20
- #12207, #12222: Make closure computation linear in the number of recursiv=
e=20
functions instead of quadratic=20
(Vincent Laviron, report by Fran=C3=A7ois Pottier, review by Nathana=C3=ABl=
le Courant=20
and Gabriel Scherer)=20
- #11040, #12591: fix a data race in major_gc.c=20
(Gabriel Scherer, review by Guillaume Munch-Maccagnoni=20
and KC Sivaramakrishnan, report by Sadiq Jaffer)=20
- #12238, #12403, #12698: read input files in one go to avoid source reprin=
ting=20
issues.=20
(Gabriel Scherer, report by Mike Spivey and Vincent Laviron, review by=20
Nicol=C3=A1s Ojeda B=C3=A4r, Xavier Leroy and Jeremy Yallop)=20
- #12334, #12368: Bad error message with mutually recursive abbreviations=
=20
(Jacques Garrigue, report by Richard Eisenberg, review by Gabriel Scherer=
=20
and Richard Eisenberg)=20
- #12401: `seek_in` and `seek_out` sometimes returned normally when given=
=20
negative offsets, instead of failing. Now both functions should consistentl=
y=20
raise `Sys_error` in this case.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer)=20
- #12267: Fix stack alignment computation=20
(Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)=20
- #12395, #12404: Fix thread-unsafety in the fallback implementation of=20
`Unix.create_process` (the one used when `posix_spawnp` is unavailable)=20
(Xavier Leroy, report by Chris Vine, review by Nicol=C3=A1s Ojeda B=C3=A4r)=
=20
- #12949: open shadowing mistriggers=20
(Gabriel Scherer, review by Florian Angeletti, report by Andreas Rossberg)=
=20
- #12526: Honor `ocaml.inline always` attribute on functions with=20
optional arguments and default values in the Closure backend=20
(Alain Frisch, review by Vincent Laviron)=20
- #12677, #12889: make Domain.DLS thread-safe=20
(Gabriel Scherer, review by Olivier Nicole and Damien Doligez,=20
report by Vesa Karvonen)=20
- #12561: Fix crash when combining TSan and frame-pointers=20
(Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard, review by Miod=
=20
Vallat and Gabriel Scherer)=20
- #12482: Rework bounds checking code in the POWER backend=20
(Miod Vallat and Xavier Leroy, report by Jan Midtgaard, review by=20
KC Sivaramakrishnan)=20
- #12528, #12703: Avoid pointer arithmetic overflow in Tag_val macro=20
(very likely harmless, but can trigger alarms)=20
(Xavier Leroy, report by Sam Goldman, review by Guillaume Munch-Maccagnoni)=
=20
- #12593: TSan should handle Effect.Unhandled correctly=20
(Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard and Miod Vallat,=
=20
review by Gabriel Scherer)=20
- #12684: fix locations filename in AST produced by the `-pp` option=20
(Gabriel Scherer, review by Florian Angeletti)=20
- #12714: check whether macros are defined before using them to ensure=20
that the headers can always be used in code which turns on -Wundef=20
(or equivalent).=20
(Antonin D=C3=A9cimo, review by Miod Vallat, Gabriel Scherer,=20
Xavier Leroy, and David Allsopp)=20
- #12726: fix segmentation fault under Windows when executing a bytecode fi=
le if=20
the runtime (`ocamlrun.exe`) cannot be found.=20
(Vadim Zborovskii, Nicol=C3=A1s Ojeda B=C3=A4r, report by Vadim Zborovskii,=
review by=20
David Allsopp)=20
- #12727, #12730: fix bug with value let-rec and labelled applications=20
(Vincent Laviron, review by Gabriel Scherer)=20
* #12751: Always keep within the 128 character limit for shebang lines. Pre=
vious=20
fix in #8622 handled building the compiler with a long prefix; this patch=
=20
extends this to the bytecode executables emitted by that compiler.=20
(David Allsopp, review by Damien Doligez, Xavier Leroy and Olivier Nicole)=
=20
- #12755: Fix data race on global pools arrays of pool_freelist=20
(Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer)=20
- #12796, #12801: Fix memory corruption in caml_unix_alloc_sockaddr=20
(Thomas Leonard, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20
- #12737: Fix data races in minor_gc.c and caml_natdynlink_open=20
(Olivier Nicole, review by Stefan Muenzel, Miod Vallat, Guillaume=20
Munch-Maccagnoni, Gabriel Scherer and Xavier Leroy)=20
- #12831: Fix call to caml_call_realloc_stack for s390x in PIC mode=20
(Vincent Laviron, report by Jerry James, review by Miod Vallat)=20
* #12837: Show non-generalizable type parameters in type definitions=20
Changes type of type parameters in outcometree.mli.=20
(Jacques Garrigue, review by Richard Eisenberg)=20
- #12897: fix locking bugs in Runtime_events=20
(Gabriel Scherer and Thomas Leonard,=20
review by Olivier Nicole, Vincent Laviron and Damien Doligez,=20
report by Thomas Leonard)=20
- #12851: Fix race between runtime events teardown and event emission=20
(Olivier Nicole, review by Miod Vallat and Gabriel Scherer)=20
- #12860: Fix an assertion that wasn't taking into account the possibility =
of an=20
ephemeron pointing at static data.=20
(Mark Shinwell, review by Gabriel Scherer and KC Sivaramakrishnan)=20
- #12861: Fix a possible crash in the `threads` library.=20
(Mark Shinwell, review by Gabriel Scherer and KC Sivaramakrishnan)=20
- #11040, #12894: Silence false data race observed between caml_shared_try_=
alloc=20
and oldify. Introduces macros to call tsan annotations which help annotate=
=20
a ``happens before'' relationship.=20
(Hari Hara Naveen S and Olivier Nicole,=20
review by Gabriel Scherer and Miod Vallat)=20
- #12958: Fix tail-modulo-cons compilation of try-with, && and ||=20
expressions.=20
(Gabriel Scherer and Nicol=C3=A1s Ojeda B=C3=A4r, report by Sylvain Boilard=
, review by=20
Gabriel Scherer)=20
- #12919: Fix register corruption in caml_callback2_asm on s390x.=20
(Miod Vallat, review by Gabriel Scherer)=20
- #12924, #12930: Rework package constraint checking to improve interaction=
with=20
immediacy=20
(Chris Casinghino and Florian Angeletti, review by Florian Angeletti and=20
Richard Eisenberg)=20
- #12969: Fix a data race in caml_darken_cont=20
(Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer and Miod Valla=
t)=20
- #12971, #12974: fix an uncaught Ctype.Escape exception on some=20
invalid programs forming recursive types.=20
(Gabriel Scherer, review by Florian Angeletti, report by Neven Villani)=20
- #13019: Remove linking instructions for the Unix library from threads.cma=
=20
(this was done for threads.cmxa in OCaml 3.11). Eliminates warnings from=20
new lld when using threads.cma of duplicated libraries.=20
(David Allsopp, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20
- #13058: Add TSan instrumentation to caml_call_gc(), since it may raise=20
exceptions.=20
(Fabrice Buoro, Olivier Nicole, Gabriel Scherer and Miod Vallat)=20
- #13079: Save and restore frame pointer across Iextcall on ARM64=20
(Tim McGilchrist, review by KC Sivaramakrishnan and Miod Vallat)=20
- #13094: Fix undefined behavior of left-shifting a negative number.=20
(Antonin D=C3=A9cimo, review by Miod Vallat and Nicol=C3=A1s Ojeda B=C3=A4r=
)=20
- #13130: minor fixes to pprintast for raw identifiers and local module ope=
n=20
syntax for types.=20
(Chet Murthy, review by Gabriel Scherer)=20
--=_f5742199-6837-4d9b-8851-db800dd67f00
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div><div>Dear OCaml users,<br><br>We have the p=
leasure of celebrating the birthday of Inge Lehmann by announcing the<br>re=
lease of OCaml version 5.2.0.<br><br>Some of the highlights in OCaml 5.2.0 =
are:<br>- Re-introduced GC compaction<br> GC compaction can now be ma=
nually triggered by calling `Gc.compact ()` manually.<br> This is exp=
ected to be particularly useful for programs that wish to release memory<br=
> to the operating system after a temporary memory-intensive phase.<b=
r><br>- Restored native backend for POWER 64 bits<br> With this resto=
red backend, all 64 bits architecture supported in OCaml 4 are<br> su=
pported bin OCaml 5<br><br>- Thread sanitizer support<br> Thread sani=
tizer is a dynamic data race detector which instrument memory<br> acc=
esses to detect and explain data races at execution time. Since the<br>&nbs=
p; instrumentation is costly (with a 2x to 7x slowdown), it must be enabled=
with<br> the `ocaml-option-tsan` configuration flag. (The reference =
manual contains<br> more information on how to use TSAN.)<br><br>- Ne=
w Dynarray module<br> This new standard library module provides a sta=
ndard implementation for resizeable array,<br> which is guaranteed to=
be memory safe even in presence of data races.<br><br>- New -H flag for hi=
dden include directories<br> This new flag makes it possible for buil=
d tools to split cleanly dependencies<br> between direct (the depende=
ncies explicitly added by the project) and indirect<br> dependencies =
(the dependencies introduced by the direct dependencies) without<br> =
the quirks of previous implementations.<br><br>- Project-wide occurence met=
adata support for developer tools<br> When compiling a module with th=
e `-bin-annot` and `-bin-annot-occurrences`<br> flags, the compiler s=
tores in the `.cmt` file an index of all occurences of<br> values, ty=
pes, modules, ...<br><br>- Raw identifiers<br> To improve OCaml upwar=
d-compatibility, there is a new syntax for lowercase<br> identifiers,=
`let \#if =3D 0`, which works even if the identifier is a keyword<br> =
; in some OCaml versions. This change has been adopted in OCaml 5.2 in<br>&=
nbsp; preparation of the introduction of the `effect` keyword in OCaml 5.3<=
br><br>- Local open in type expressions<br> Local open are now allowe=
d in type expression: `val (+): Int64.(t -> t -> t)`.<br><br>And a lo=
t of incremental changes:</div><div><br>- Around 20 new functions in the st=
andard library besides the new Dynarray module<br> (in the `Array`, `=
Float`, `Format`, `Fun`, `In_channel`, `Out_channel`, and `Random` modules =
)<br><br>- Many fixes and improvements in the runtime<br>- Many bug fixes<b=
r><br>OCaml 5.2.0 is still a somewhat experimental release compared to the =
OCaml<br>4.14 branch. In particular<br><br> - The Windows MSVC =
port is still unavailable.<br> - Ephemeron performances need to=
be investigated.<br> - `statmemprof` is being tested in the de=
veloper branch of OCaml.<br> - There are a number of known runt=
ime concurrency or GC performance bugs<br> (that tr=
igger under rare circumstances).<br><br>Since the Windows MSVC port and sta=
tmemprof are still missing, the maintenance<br>support for OCaml 4.14 will =
be extended until at least the end of the year.<br><br>Please report any un=
expected behaviours on the OCaml issue tracker (https://github.com/ocaml/oc=
aml/issues)<br>and post any questions or comments you might have on our dis=
cussion forums (https://discuss.ocaml.org).<br><br>The full list of changes=
can be found in the changelog below.<br><br>Happy hacking,<br>=E2=80=94 Fl=
orian Angeletti for the OCaml team.<br><br>Installation Instructions<br>---=
---------------------------<br><br>The base compiler can be installed as an=
opam switch with the following commands:<br><br> opam up=
date<br> opam switch create 5.2.0<br><br>The source code =
for the release candidate is also directly available on:<br><br>* GitHub: h=
ttps://github.com/ocaml/ocaml/archive/5.2.0.tar.gz<br>* OCaml archives at I=
nria: https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.0.tar.gz<br><br=
>Fine-Tuned Compiler Configuration<br>-------------------------------------=
---------<br><br>If you want to tweak the configuration of the compiler, yo=
u can switch to the option variant with:<br><br> opam upd=
ate<br> opam switch create <switch_name> ocaml-vari=
ants.5.1.0+options <option_list><br><br>where `<option_list>` i=
s a qpace separated list of `ocaml-option-*` packages. For instance, for a =
`flambda` and `no-flat-float-array` switch:<br><br> opam =
switch create 5.2.0+flambda+nffa ocaml-variants.5.2.0+options ocaml-option-=
flambda ocaml-option-no-flat-float-array<br><br>Changes in OCaml 5.2.0 (13 =
May 2024)<br>------------------------------------<br><br>(Changes that can =
break existing programs are marked with a "*")<br><br>### Restored backends=
:<br><br>- #12276, #12601: native-code compilation for POWER (64 bits, litt=
le-endian)<br> (Xavier Leroy, review by KC Sivaramakrishnan, Anil Mad=
havapeddy,<br> and Stephen Dolan)<br><br>- #12667: extend the l=
atter to POWER 64 bits, big-endian, ELFv2 ABI<br> (A. Wilcox, review =
by Xavier Leroy)<br><br>### Runtime system:<br><br>- #12193: Re-introduce G=
C compaction for shared pools<br> Adds a parallel compactor for the s=
hared pools (which contain major heap<br> blocks sized less than 128 =
words). Explicit only for now, on calls to<br> `Gc.compact`.<br> =
; (Sadiq Jaffer, Nick Barnes, review by Anil Madhavapeddy, Damien Doligez,<=
br> David Allsopp, Miod Vallat, Artem Pianykh, Stephen Dolan, M=
ark Shinwell<br> and KC Sivaramakrishnan)<br><br>- #12114: Add =
ThreadSanitizer support<br> (Fabrice Buoro and Olivier Nicole, based =
on an initial work by Anmol Sahoo,<br> review by Damien Doligez=
, S=C3=A9bastien Hinderer, Jacques-Henri Jourdan, Luc<br> Maran=
get, Guillaume Munch-Maccagnoni, Gabriel Scherer)<br><br><br>- #12850: Upda=
te Gc.quick_stat data at the end of major cycles and compaction<br> T=
his PR adds an additional caml_collect_gc_stats_sample_stw to the major hea=
p<br> cycling stw. This means that Gc.quick_stat now actually reflect=
s the state of<br> the heap after a major cycle or compaction.<br>&nb=
sp; (Sadiq Jaffer, review by Miod Vallat and Gabriel Scherer)<br><br>- #128=
59: Ensure Gc.compact does a full major before the compactor runs<br> =
(Sadiq Jaffer, review by Leo White, Mark Shinwell, Gabriel Scherer,<br>&nb=
sp; Josh Berdine, David Allsopp and KC Sivaramakrishnan)<br><br>- #10=
111: Increase the detail of location information for debugging events to<br=
> allow the end line number and character offset to be reported.<br>&=
nbsp; (David Allsopp, review by Nick Barnes, Enguerrand Decorne and Stephen=
Dolan)<br><br>- #10403, #12202: introduce `caml_ext_table_add_noexc` that =
does not<br> raise `Out_of_memory` exceptions and use it inside the b=
locking sections<br> of `caml_read_directory`. Also, check for =
overflows in ext table sizes.<br> (Xavier Leroy, report by Arseniy Al=
ekseyev, review by Gabriel Scherer)<br><br>- #11332, #12702: make sure `Boo=
l_val(v)` has type `bool` in C++<br> (Xavier Leroy, report by ygrek, =
review by Gabriel Scherer)<br><br>- #12772, #12787: Avoid using _Bool in pu=
blic headers for the sake of C++<br> compatibility<br> (Guillau=
me Munch-Maccagnoni, report by KC Sivaramakrishnan, review<br> by Xav=
ier Leroy and KC Sivaramakrishnan)<br><br>- #12223: Constify constructors a=
nd flags tables in C code. Now these<br> tables will go in the readon=
ly segment, where they belong.<br> (Antonin D=C3=A9cimo, review by Ga=
briel Scherer and Xavier Leroy)<br><br>- #12234: make instrumented time cal=
culation more thread-safe on macOS.<br> (Anil Madhavapeddy, review by=
Daniel B=C3=BCnzli and Xavier Leroy)<br><br>- #12235, #12468: introduce an=
d use the `CAMLnoret` macro as<br> a lighter alternative to `CAMLnore=
turn_start` / `CAMLnoreturn_end`.<br> Implement it so as to conform w=
ith C11, C23, C++11, C++17.<br> (Xavier Leroy and Dhruv Maroo, with h=
elp from Antonin D=C3=A9cimo, review by<br> Gabriel Scherer and=
David Allsopp)<br><br>- #12275: caml/stack.h: more abstract macros to desc=
ribe OCaml stacks and<br> how to traverse them, supporting more stack=
layouts.<br> (Xavier Leroy, review by KC Sivaramakrishnan and Fabric=
e Buoro)<br><br>- #12268: deliver `Out_of_memory` exception if domain creat=
ion fails<br> due to memory resource exhaustion. It was previou=
s always a `Failure`.<br> (Anil Madhavapeddy, review by David Allsopp=
)<br><br>- #12300, #12314: Discard out_channel buffered data on permanent I=
/O error<br> (Xavier Leroy, report by T=C3=B6r=C3=B6k Edwin, review b=
y Anil Madhavapeddy<br> and Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11=
386: Simplifications and fixes to multicore systhreads implementation.<br>&=
nbsp; (Guillaume Munch-Maccagnoni, review by Anil Madhavapeddy and KC<br>&n=
bsp; Sivaramakrishnan)<br><br>- #12875, #12879, #12882: Execute preem=
ptive systhread switching as a<br> delayed pending action. This ensur=
es that one can reason within the<br> FFI that no mutation happens on=
the same domain when allocating on<br> the OCaml heap from C, consis=
tently with OCaml 4. This also fixes<br> further bugs with the multic=
ore systhreads implementation.<br> (Guillaume Munch-Maccagnoni, bug r=
eports and suggestion by Mark<br> Shinwell, review by Nick Barn=
es and Stephen Dolan)<br><br>- #12408: `Domain.spawn` no longer leaks its f=
unctional argument for<br> the whole duration of the children domain =
lifetime.<br> (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)=
<br><br>- #12409: Fix unsafety and deadlocks should an asynchronous excepti=
on<br> arise at specific locations during domain creation and shutdow=
n.<br> (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)<br><br=
>- #11911, #12381: Restore statmemprof functionality in part, with<br> =
; some API changes in Gc.Memprof.<br> (Nick Barnes, review by Jacques=
-Henri Jourdan<br> and Guillaume Munch-Maccagnoni).<br><br>- #1=
2430: Simplify dynamic bytecode loading in Meta.reify_bytecode<br> (S=
tephen Dolan, review by S=C3=A9bastien Hinderer, Vincent Laviron and Xavier=
<br> Leroy)<br><br>- #12489: Fix an error-handling bug in caml_=
alloc_sprintf<br> (Stephen Dolan, report by Chris Casinghino, review =
by Jeremy Yallop<br> and Xavier Leroy)<br><br>- #11307: Finish =
adapting the implementation of asynchronous actions for<br> multicore=
: soundness, liveness, and performance issues.<br> Do not crash if a =
signal handler is called from an unregistered C<br> thread, and other=
possible soundness issues. Prevent issues where join<br> on other do=
mains could make the toplevel unresponsible to Ctrl-C. Avoid<br> need=
less repeated polling in C code when callbacks cannot run<br> immedia=
tely.<br> (Guillaume Munch-Maccagnoni, review by Enguerrand Decorne, =
Xavier<br> Leroy, and KC Sivaramakrishnan)<br><br>- #12634: Simplify =
TSan backtrace bookkeeping upon raise<br> (Olivier Nicole and Fabrice=
Buoro, review by Gabriel Scherer)<br><br>* #12686: Some primitives had the=
wrong types to be callable from the bytecode<br> interpreter. =
Either fix their types, mark them as `CAMLexport` instead of<br> `CAM=
Lprim`, or remove them entirely if no longer used.<br> (Xavier Leroy,=
review by David Allsopp)<br><br>- #12700, continuing #11763 and trying to =
address #12660:<br> Use the correct types for primitives when generat=
ing the table of primitives<br> used by ocamlrun.<br> (Xavier L=
eroy, motivation, review and improvements by Antonin D=C3=A9cimo)<br><br>- =
#12345, #12710: Fix issues with finaliser orphaning at domain termination<b=
r> (KC Sivaramakrishnan, report by Gabriel Scherer, review by Gabriel=
Scherer,<br> Sadiq Jaffer and Fabrice Buoro)<br><br>- #12599: Refact=
or Dynlink startup to avoid parsing bytecode sections twice<br> (Step=
hen Dolan, review by David Allsopp, Hugo Heuzard, Damien Doligez and<br>&nb=
sp; Xavier Leroy)<br><br>- #12678, #12898: free channel buffers on cl=
ose rather than on finalization<br> (Damien Doligez, review by Jan Mi=
dtgaard and Gabriel Scherer, report<br> by Jan Midtgaard)<br><b=
r>- #12681: Fix TSan false positives due to volatile write handling<br>&nbs=
p; (Olivier Nicole, Fabrice Buoro and Anmol Sahoo, review by Luc Maranget,<=
br> Gabriel Scherer, Hernan Ponce de Leon and Xavier Leroy)<br>=
<br>- #12743: Use pthread_sigmask instead of sigprocmask<br> Updates =
usage of sigprocmask to pthread_sigmask in otherlibs/unix.<br> (Max S=
later, review by Miod Vallat and Xavier Leroy)<br><br>- #12769: Unify MSVC =
and MinGW-w64 code paths, by always using WinAPI<br> directly.<br>&nb=
sp; (David Allsopp, Antonin D=C3=A9cimo, and Samuel Hym, review by Nicolas<=
br> Ojeda Bar)<br><br>- #11911, #12382, #12383: Restore statmem=
prof functionality in part<br> (backtrace buffers, per-thread and per=
-domain data structures,<br> GC/allocation interface). (Nick Barnes, =
review by Gabriel Scherer,<br> Fabrice Buoro, Sadiq Jaffer, Guillaume=
Munch-Maccagnoni, and<br> Jacques-Henri Jourdan).<br><br>- #12735: S=
tore both ends of the stack chain in continuations<br> (Leo White, re=
view by Miod Vallat and KC Sivaramakrishnan)<br><br>- #12746: Simplify and =
clean up TSan annotations<br> (Olivier Nicole, review by Miod Vallat =
and Fabrice Buoro)<br><br>- #12809: Add ThreadSanitizer support to FreeBSD/=
amd64<br> (Miod Vallat, review by Gabriel Scherer)<br><br>- #12810: P=
ort ThreadSanitizer support to Linux and macOS on arm64<br> (Miod Val=
lat, review by Tim McGilchrist)<br><br>- #12811: Define and use the CAMLthr=
ead_local macro for TLS variables.<br> (Antonin D=C3=A9cimo and Samue=
l Hym, review by Miod Vallat and Xavier Leroy)<br><br>- #12814: More detail=
ed failure messages from `input_value` and `Marshal.from_*`<br> (Xavi=
er Leroy, review by Stephen Dolan and Anil Madhavapeddy)<br><br>- #12815: C=
orrectly format multi-line locations in exception backtraces, in the<br>&nb=
sp; style that the compiler driver uses.<br> (David Allsopp, review b=
y Gabriel Scherer)<br><br>- #12773, #12830, #12834: Rewrite `caml_c_thread_=
(un)register` to fix<br> various bugs.<br> (Guillaume Munch-Mac=
cagnoni, reported by Miod Vallat, suggested by<br> Hari Hara Na=
veen S, reviewed by Fabrice Buoro, Gabriel Scherer and<br> Miod=
Vallat)<br><br>- #12876: Port ThreadSanitizer support to Linux on POWER<br=
> (Miod Vallat, review by Tim McGilchrist)<br><br>- #12886: Reinitial=
ize IO mutexes after fork<br> (Max Slater, review by Guillaume Munch-=
Maccagnoni and Xavier Leroy)<br><br>- #12907: Port ThreadSanitizer support =
to Linux on RiscV<br> (Miod Vallat, review by Nicol=C3=A1s Ojeda B=C3=
=A4r and Fabrice Buoro)<br><br>- #12915: Port ThreadSanitizer support to Li=
nux on s390x<br> (Miod Vallat, review by Tim McGilchrist)<br><br>- #1=
2934: Fix data races between marking and sweeping functions<br> (Oliv=
ier Nicole, suggested by Stephen Dolan, review by Gabriel Scherer,<br> =
; Miod Vallat and Damien Doligez)<br><br>### Language features:<br><b=
r>- #12295, #12568: Give `while true' a polymorphic type, similarly to<br>&=
nbsp; `assert false'<br> (Jeremy Yallop, review by Nicol=C3=A1s Ojeda=
B=C3=A4r and Gabriel Scherer,<br> suggestion by Rodolphe Lepigre and=
John Whitington)<br><br>- #12044: Add local module open syntax for types.<=
br> ```<br> module A =3D struct<br> &nbs=
p; type t =3D int<br> type r =3D =
unit<br> type s =3D string<br> &nb=
sp; end<br><br> type example =3D A.(t * r * s)<br> =
```<br> (Alistair O'Brien, review by Gabriel Scherer, Nicol=C3=A1s Oj=
eda B=C3=A4r<br> and Florian Angeletti)<br><br>- #11252, RFC 27=
: Support raw identifier syntax \#foo<br> (Stephen Dolan, review by D=
avid Allsopp, Gabriel Scherer and Olivier Nicole)<br><br><br>- #12315: Use =
type annotations from arguments in let rec<br> (Stephen Dolan, review=
by Gabriel Scherer)<br><br>- #12375: allow use of [@untagged] for all imme=
diate types like char, bool,<br> and variant with only constant const=
ructors.<br> (Christophe Raffalli, review by Gabriel Scherer)<br><br>=
* #12502: the compiler now normalizes the newline sequence \r\n to<br> =
; a single \n character during lexing, to guarantee that the semantics<br>&=
nbsp; of newlines in string literals is not modified by Windows tools<br>&n=
bsp; transforming \n into \r\n in source files.<br> Warning 29 [eol-i=
n-string] is not emitted anymore, as the normalization<br> gives a mo=
re robust semantics to newlines in string literals.<br> (Gabriel Sche=
rer and Damien Doligez, review by Daniel B=C3=BCnzli, David<br> =
Allsopp, Andreas Rossberg, Xavier Leroy, report by Andreas Rossberg)<br><b=
r>### Standard library:<br><br>- #11563: Add the Dynarray module to the std=
lib. Dynamic arrays are<br> arrays whose length can be changed by add=
ing or removing elements at<br> the end, similar to 'vectors' in C++ =
or Rust.<br> (Gabriel Scherer, Simon Cruanes and Florian Angeletti, r=
eview by<br> Daniel B=C3=BCnzli, Guillaume Munch-Maccagnoni, Cl=
=C3=A9ment Allain,<br> Damien Doligez, Wiktor Kuchta and Pieter=
Goetschalckx)<br><br><br>- #12716: Add `Format.pp_print_nothing` function.=
<br> (L=C3=A9o Andr=C3=A8s, review by Gabriel Scherer and Nicol=C3=A1=
s Ojeda B=C3=A4r)<br><br>* #6732, #12423: Make Buffer.add_substitute surjec=
tive and fix its<br> documentation.<br> (Damien Doligez, review=
by Antonin D=C3=A9cimo)<br><br>* #10775, #12499: Half-precision floating-p=
oint elements in Bigarray.<br> (Anton Yabchinskiy, review by Xavier L=
eroy and Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11517, #12477: Expose pp_in=
finity in interface of the format module, and<br> check that margin i=
s less than pp_infinity when setting or checking geometry.<br> (Janit=
h Petangoda, reported by Simmo Saan, reviewed by Florian Angeletti,<br>&nbs=
p; Simmo Saan, Josh Berdine and Gabriel Scherer)<br><br>- #12217: Add `Arra=
y.shuffle`.<br> (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=
=C3=A4r, David Allsopp and Alain Frisch)<br><br>- #12212: Add cache-aligned=
constructor for atomics. The patch ensures that<br> all allocations =
(of the right size) in the shared heap are aligned.<br> (Bartosz Mode=
lski with Gabriel Scherer, Guillaume Munch-Maccagnoni,<br> Xavi=
er Leroy, review by Alain Frisch, Anil Madhavapeddy, Gabriel Scherer,<br>&n=
bsp; Guillaume Munch-Maccagnoni, KC Sivaramakrishnan, Stefan Muenzel,=
<br> Xavier Leroy)<br><br>- #12307: Add BLAKE2b hashing and an =
MD5 submodule to the Digest module.<br> (Xavier Leroy, review by Oliv=
ier Nicole, Gabriel Scherer, Wiktor Kuchta,<br> Daniel B=C3=BCn=
zli, David Allsopp)<br><br>- #12365: Add In_channel.input_bigarray, In_chan=
nel.really_input_bigarray,<br> Out_channel.output_bigarray, Unix.read=
_bigarray, Unix.write_bigarray,<br> Unix.single_write_bigarray.<br>&n=
bsp; (Nicol=C3=A1s Ojeda B=C3=A4r, review by Jeremy Yallop, Xavier Leroy, G=
abriel Scherer,<br> David Allsopp)<br><br>- #12455: Add `Array.=
init_matrix`, `Float.Array.make_matrix`,<br> `Float.Array.init_matrix=
`.<br> (Glen M=C3=A9vel, review by Xavier Leroy, Gabriel Scherer, Jer=
emy Yallop,<br> Nicolas Ojeda Bar)<br><br>* #12455: `Array.make_matri=
x dimx dimy f` now raises `Invalid_argument`<br> when `dimx =3D 0 &am=
p;& dimy < 0` This was already specified but not enforced.<br> =
(Glen M=C3=A9vel, report by Jeremy Yallop, review by Nicolas Ojeda Bar)<br=
><br>- #12459: Add `Random.int_in_range`, `Random.int32_in_range`,<br> =
; `Random.int64_in_range`, `Random.nativeint_in_range`,<br> and their=
counterpart in `Random.State`.<br> (Glen M=C3=A9vel and Xavier Leroy=
, review by Gabriel Scherer, Xavier Leroy,<br> Florian Angelett=
i)<br><br>- #12459: `Random`: restore compatibility between 32-bit integers=
(JavaScript)<br> and 63-bit integers (64-bit OCaml).<br> For `=
Random.full_int` this was guaranteed in 4.14 but wrongly removed in 5.0.<br=
> (Xavier Leroy, review by Glen M=C3=A9vel)<br><br>- #12511: Minor pe=
rformance improvements and cleanups in the implementation<br> of modu=
les Int32, Int64, and Nativeint<br> (Xavier Leroy, review by Gabriel =
Scherer and Daniel B=C3=BCnzli)<br><br>- #12558: Adapt GC alarms for multic=
ore and fix their documentation.<br> (Guillaume Munch-Maccagnoni, rev=
iew by KC Sivaramakrishnan<br> and Gabriel Scherer)<br><br>- #1=
2625: Remove the Closure module from Obj<br> (Vincent Laviron, review=
by Xavier Leroy)<br><br>- #12758, #12998: Remove the `Marshal.Compression`=
flag to the<br> `Marshal.to_*` functions. The compilers are st=
ill able to use<br> ZSTD compression for compilation artefacts.<br>&n=
bsp; This is a forward port and clean-up of the emergency fix that was intr=
oduced<br> in OCaml 5.1.1 by #12734.<br> (Xavier Leroy, review =
by Damien Doligez)<br><br>- #12784: Fix computation of minor-heap allocatio=
n in Gc.counters()<br> and Gc.allocated_bytes(). (Nick Barnes, review=
by Gabriel Scherer)<br><br>- #12770: Add `Fun.compose`.<br> (Justin =
Frank, review by Nicol=C3=A1s Ojeda B=C3=A4r, Daniel B=C3=BCnzli and Jeremy=
Yallop)<br><br>- #12845: Add `{In,Out}_channel.is_binary_mode` as the dual=
of<br> `set_binary_mode`. This function was previously only availabl=
e in the internal<br> C API.<br> (David Allsopp, review by Nico=
l=C3=A1s Ojeda B=C3=A4r and Xavier Leroy)<br><br>### Type system:<br><br>- =
#12313, #11799: Do not re-build as-pattern type when a ground type annotati=
on<br> is given. This allows to work around problems with GADTs in as=
-patterns.<br> (Jacques Garrigue, report by Leo White, review by Gabr=
iel Scherer)<br><br>### Code generation and optimizations:<br><br>- #11239:=
on x86-64 and RISC-V, reduce alignment of OCaml stacks from 16 to 8.<br>&n=
bsp; This reduces stack usage. It's only C stacks that require 16-ali=
gnment.<br> (Xavier Leroy, review by Gabriel Scherer and Stephen Dola=
n)<br><br>- #12311: on POWER, 32-bit FP numbers stored in memory (e.g. in b=
igarrays)<br> were not correctly rounded sometimes.<br> (Xavier=
Leroy, review by Anil Madhavapeddy and Tim McGilchrist)<br><br>- #12551, #=
12608, #12782, #12596: Overhaul of recursive value compilation.<br> N=
on-function recursive bindings are now forbidden from Lambda onwards,<br>&n=
bsp; and compiled using a new Value_rec_compiler module.<br> (Vincent=
Laviron and Lunia Ayanides, review by Gabriel Scherer,<br> Ste=
fan Muenzel and Nathana=C3=ABlle Courant)<br><br>- #1809, #12181: rewrite `=
compare x y op 0` to `x op y` when values are integers<br> (Xavier Cl=
erc, Stefan Muenzel, review by Gabriel Scherer and Vincent Laviron)<br><br>=
- #12825: disable common subexpression elimination for atomic loads... agai=
n.<br> (Gabriel Scherer, review by KC Sivaramakrishnan, Xavier Leroy<=
br> and Vincent Laviron, report by Vesa Karvonen)<br><br>### Ot=
her libraries:<br><br>- #12213: Dynlink library, improve legibility of erro=
r messages<br> (Samuel Hym, review by Gabriel Scherer and Nicol=C3=A1=
s Ojeda B=C3=A4r)<br><br>* #12686: Runtime_events library, C API: define<br=
> `caml_runtime_events_{start,pause,resume}` as returning `void`<br>&=
nbsp; instead of `value`.<br> (Xavier Leroy, review by David Allsopp)=
<br><br>### Compiler user-interface and warnings:<br><br>- #11989, #12246, =
RFC 31: New flag, -H, to allow for transitive dependencies<br> withou=
t including them in the initial environment.<br> (Chris Casinghino, F=
ran=C3=A7ois Bobot, and Gabriel Scherer, review by Leo White<br>  =
; and Stefan Muenzel, RFC by Fran=C3=A7ois Bobot)<br><br><br>* #10613, #124=
05: Simplify the values used for the system variable (`system:` in<br> =
; `ocamlopt -config` or the `Config.system` constant). In particular, s390x=
and<br> ppc64 now report "linux" instead of "elf"; all variants of 3=
2-bit ARM on Linux<br> now report "linux"; OpenBSD now reports "openb=
sd" instead of "bsd" for 32-bit<br> ARM; FreeBSD, NetBSD and OpenBSD =
now report the same value for both x86_64 and<br> x86_32; x86_32 syst=
ems matching *bsd but not freebsd*, netbsd* or openbsd*<br> are no lo=
nger identified (as on x86_64); x86_32 Linux now reports "linux"<br> =
instead of "linux_elf".<br> (David Allsopp, request by Kate Deplaix, =
review by S=C3=A9bastien Hinderer and<br> Xavier Leroy)<br><br>- #122=
47: configure: --disable-ocamldebug can now be used instead<br> of --=
disable-debugger (which remains available for compatibility)<br> (Gab=
riel Scherer, review by Damien Doligez and S=C3=A9bastien Hinderer)<br><br>=
- #12199: improve the error message for non-overriding `inherit!`<br> =
(Florian Angeletti, review by Jules Aguillon)<br><br>- #12210: uniform sty=
le for inline code in compiler messages<br> (Florian Angeletti, revie=
w by Gabriel Scherer)<br><br>* #12278, #:12325: Remove the OCAML_FLEXLINK e=
nvironment variable from the<br> compiler drivers. This environment v=
ariable was previously used as part of the<br> FlexDLL bootstrap proc=
edure and existed solely for that purpose. Its removal<br> greatly si=
mplifies both the build system and testsuite machinery.<br> (David Al=
lsopp, review by S=C3=A9bastien Hinderer)<br><br>- #12347: error messages: =
always report missing polyvariant tags<br> (Florian Angeletti, report=
by Tianbo Hao, review by Gabriel Scherer)<br><br>- #12224, specialized err=
or message when trying to apply non-functor<br> module (e.g `module M=
=3D Int(Int)`)<br> (Florian Angeletti, review by Gabriel Scherer)<br=
><br>- #12451: Warning 53 (misplaced attributes) now works for all attribut=
es.<br> (Chris Casinghino, review by Florian Angeletti)<br><br>- #126=
22: Give hints about existential types appearing in error messages<br> =
; (Leo White, review by Gabriel Scherer and Florian Angeletti)<br><br>- #12=
671: When a class type parameter or class parameter does not match,<br>&nbs=
p; identify which parameter in the error message, instead of saying<br>&nbs=
p; "A type parameter" or "A parameter".<br> (Stefan Muenzel, review b=
y Gabriel Scherer)<br><br>- #12679: Add more detail to the error message an=
d manual in case of<br> invalid module type substitutions.<br> =
(Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)<br><br>- =
#12750: Display the command executed to extract primitives in<br> `oc=
amlc -verbose`.<br> (David Allsopp, review by Nicol=C3=A1s Ojeda B=C3=
=A4r)<br><br>- #12777: Add details about the actual and expected method typ=
es to the method<br> mismatch error messages.<br> (Javier Ch=C3=
=A1varri, review by Gabriel Scherer and Florian Angeletti)<br><br>* #12942:=
Fix an line ordering in some module inclusion error messages<br> (Ni=
ck Roberts, review by Florian Angeletti, report by Carl Eastlund)<br>### Ma=
nual and documentation:<br><br>- #12338: clarification of the documentation=
of process related function in<br> the unix module regarding the fir=
st element of args and shell's pid.<br> (Christophe Raffalli, review =
by Florian Angeletti)<br><br>- #12473: Document in runtime/memory.c our cur=
rent understanding of<br> accesses to the OCaml heap from the C runti=
me code -- the problem<br> of hybrid programs mixing two memory model=
s.<br> (Gabriel Scherer and Guillaume Munch-Maccagnoni, review by Oli=
vier<br> Nicole and Xavier Leroy)<br><br>- #12456: Document the=
incompatibility between effects on the one<br> hand, and `caml_callb=
ack` and asynchronous callbacks (signal<br> handlers, finalisers, mem=
prof callbacks...) on the other hand.<br> (Guillaume Munch-Maccagnoni=
, review by KC Sivaramakrishnan)<br><br>- #12694: Document in runtime/tsan.=
c the TSan instrumentation choices and the<br> consequences with rega=
rd to the memory model.<br> (Olivier Nicole, review by Miod Vallat, G=
abriel Scherer, Guillaume<br> Munch-Maccagnoni and Fabrice Buor=
o)<br><br>- #12802: Add manual chapter about ThreadSanitizer support<br>&nb=
sp; (Olivier Nicole, review by Miod Vallat, Sebastien Hinderer, Fabrice Buo=
ro,<br> Gabriel Scherer and KC Sivaramakrishnan)<br><br>- #1281=
9: Clarify which runtime interactions are allowed in custom ops<br> (=
Basile Cl=C3=A9ment, review by Guillaume Munch-Maccagnoni and Xavier Leroy)=
<br><br>- #12840: manual: update runtime tracing chapter for custom events =
(ex #12335)<br> (Lucas Pluvinage, Sadiq Jaffer and Olivier Nicole, re=
view by Gabriel Scherer,<br> David Allsopp, Tim McGilchrist and=
Thomas Leonard)<br><br>- #13066, update OCAMLRUNPARAM documentation for th=
e stack size parameter l<br> (Florian Angeletti, review by Nicol=C3=
=A1s Ojeda B=C3=A4r, Tim McGilchrist, and<br> Miod Vallat)<br><=
br>- #13078: update Format tutorial on structural boxes to mention alignmen=
t<br> questions.<br> (Edwin T=C3=B6r=C3=B6k, review by Florian =
Angeletti)<br><br>- #13092: document the existence of the `[@@poll error]` =
built-in attribute<br> (Florian Angeletti, review by Gabriel Scherer)=
<br><br>### Tools:<br><br>- #12340: testsuite: collect known issues with cu=
rrent -short-paths<br> implementation for existential types<br> =
(Florian Angeletti, Samuel Hym, review by Florian Angeletti and Thomas Ref=
is)<br><br>- #12147: ocamllex: Allow carriage returns at the end of line di=
rectives.<br> (SeungCheol Jung, review by Nicol=C3=A1s Ojeda B=C3=A4r=
)<br><br>- #12260: Fix invalid_argument on some external or module aliases =
in ocamlnat<br> (Fabian Hemmer, review by Vincent Laviron)<br><br>- #=
12185: New script language for ocamltest.<br> (Damien Doligez with Fl=
orian Angeletti, S=C3=A9bastien Hinderer, Gabriel Scherer,<br> =
review by S=C3=A9bastien Hinderer and Gabriel Scherer)<br><br>- #12371: oca=
mltest: fix recursive expansion of variables.<br> (Antonin D=C3=A9cim=
o, Damien Doligez, review by S=C3=A9bastien Hinderer,<br> Damie=
n Doligez, Gabriel Scherer, and Xavier Leroy)<br><br>* #12497, #12613: Make=
ocamlc/ocamlopt fail with an error when no<br> input files are speci=
fied to build an executable.<br> (Antonin D=C3=A9cimo, review by S=C3=
=A9bastien Hinderer)<br><br>- #12576: ocamldep: various refactors.<br> =
; (Antonin D=C3=A9cimo, review by Florian Angeletti, Gabriel Scherer, and L=
=C3=A9o Andr=C3=A8s)<br><br>- #12615: ocamldoc: get rid of the odoc_literat=
e and odoc_todo generators.<br> (S=C3=A9baistien Hinderer, review by =
Gabriel Scherer and Florian Angeletti)<br><br>- #12624: Use $XDG_CONFIG_DIR=
S in addition to $XDG_CONFIG_HOME when searching<br> for init.ml and =
use this to extend init.ml support to the toplevel when<br> running o=
n Windows.<br> (David Allsopp, report by Jonah Beckford, review by Ni=
col=C3=A1s Ojeda B=C3=A4r and<br> Antonin D=C3=A9cimo)<br><br>-=
#12688: Setting the env variable `NO_COLOR` with an empty value no longer<=
br> has effects. Previously, setting `NO_COLOR` with any value, inclu=
ding<br> the empty value, would disable colors (unless `OCAML_COLOR` =
is also set).<br> After this change, the user must set `NO_COLOR` wit=
h an non-empty value<br> to disable colors. This reflects a specifica=
tion clarification/change<br> from the upstream website at https://no=
-color.org.<br> (Favonia, review by Gabriel Scherer)<br><br>- #12744:=
ocamltest: run tests in recursive subdirs more eagerly<br> (Nick Rob=
erts, review by Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #12901, 12908: ocamll=
ex: add overflow checks to prevent generating incorrect<br> lexers; u=
se unsigned numbers in the table encoding when possible.<br> (Vincent=
Laviron, report by Edwin T=C3=B6r=C3=B6k, review by Xavier Leroy)<br><br>#=
## Internal/compiler-libs changes:<br><br>- #12508 : Add compiler-side supp=
ort for project-wide occurrences in Merlin, by<br> generating index t=
ables of all identifier occurrences. This extra data in .cmt<br> file=
s is only added when the new flag -bin-annot-occurrences is passed.<br>&nbs=
p; (Ulysse G=C3=A9rard, Nathana=C3=ABlle Courant, suggestions by Gabriel Sc=
herer and Thomas<br> Refis, review by Florian Angeletti, Gabriel Sche=
rer and Thomas Refis)<br><br>- #12236, #12386, #12391, #12496, #12673: Use =
syntax as sole determiner of arity<br> This changes function arity to=
be based solely on the source program's<br> parsetree. Previously, t=
he heuristic for arity had more subtle heuristics<br> that involved t=
ype information about patterns. Function arity is important<br> =
because it determines when a pattern match's effects run and is an input<b=
r> into the fast path for function application.<br><br> This ch=
ange affects tooling: it changes the function constructs in parsetree<br>&n=
bsp; and typedtree.<br><br> See https://github.com/ocaml/RFCs/pull/32=
for the original RFC.<br><br> (Nick Roberts; review by Richard Eisen=
berg, Leo White, and Gabriel Scherer;<br> RFC by Stephen Dolan)<br><b=
r><br>- #12639: parsing: Attach a location to the RHS of Ptyp_alias<br>&nbs=
p; and improve the 'alias type mismatch' error message.<br> (Jules Ag=
uillon, review by Florian Angeletti)<br><br>- #12447: Remove 32-bit targets=
from X86_proc.system<br> (Masanori Ogino, review by David Allsopp)<b=
r><br>- #12216, #12248: Prevent reordering of atomic loads during instructi=
on<br> scheduling. This is for reference, as instruction schedu=
ling is currently<br> unused in OCaml 5.<br> (Xavier Leroy, rep=
ort by Luc Maranget and KC Sivaramakrishnan,<br> review by Nico=
l=C3=A1s Ojeda B=C3=A4r)<br><br>- #12025: Split Typecore.unify_pat_types in=
to two<br> to avoid unnecessary references to the environment in type=
_pat<br> (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Sc=
herer)<br><br>- #12031: Use dedicated types to represent names of compilati=
on units<br> and predefined exceptions in CMO files.<br> (S=C3=
=A9bastien Hinderer, review by Florian Angeletti, Thomas Refis,<br> G=
abriel Scherer, Vincent Laviron, Pierre Chambart, Luke Maurer,<br> Hu=
go Heuzard, Xavier Leroy and Damien Doligez)<br><br>- #12109: Pack paramete=
rs to unification in unification_environment<br> (Takafumi Saikawa an=
d Jacques Garrigue, review by Richard Eisenberg)<br><br>- #12331, #12361: P=
ack the unification data for pattern checking in Typecore<br> (Takafu=
mi Saikawa and Jacques Garrigue,<br> review by Gabriel Scherer,=
Thomas Refis and Florian Angeletti)<br><br>- #12229: Remove global mutable=
state for typechecking patterns<br> in Typecore in favor of local mu=
table state.<br> (Nick Roberts, review by Takafumi Saikawa)<br><br>- =
#12542: Minor bugfix to #12236: restore dropped call to `instance`<br> =
; (Nick Roberts, review by Jacques Garrigue)<br><br>- #12242: Move the comp=
utation of stack frame parameters to a separate<br> `Stackframe` modu=
le, and save the parameters in the results of the<br> `Linearize` pas=
s<br> (Xavier Leroy, review by KC Sivaramakrishnan and Mark Shinwell)=
<br><br>- #12442: document jump summaries in the pattern-matching compiler<=
br> (Gabriel Scherer and Thomas Refis, review by Florian Angeletti<br=
> and Vincent Laviron)<br><br>- #12446, #12792: remove the hook=
s machinery around channel locking<br> in runtime/io.c<br> (Gab=
riel Scherer, review by Xavier Leroy)<br><br>- #12389, #12544, #12984, #129=
87: centralize the handling of metadata for<br> compilation units and=
artifacts in preparation for better unicode support for<br> OCaml so=
urce files.<br> (Florian Angeletti, review by Vincent Laviron and Gab=
riel Scherer)<br><br>- #12532, #12553: improve readability of the pattern-m=
atching debug output<br> (Gabriel Scherer, review by Thomas Refis)<br=
><br>- #12537: Use C11/C++11 standard static assertion.<br> (Antonin =
D=C3=A9cimo, review by Sebastien Hinderer, Xavier Leroy,<br> an=
d KC Sivaramakrishnan)<br><br>- #12169: runtime: document and enforce namin=
g conventions around STW sections.<br> (Gabriel Scherer, review by En=
guerrand Decorne, Miod Vallat, B. Szilvasy<br> and Nick Barnes,=
report by KC Sivaramakrishnan)<br><br>- #12669 : Clean up some global stat=
e handling in schedgen<br> (Stefan Muenzel, review by Miod Vallat and=
Gabriel Scherer)<br><br>- #12640: Make the module separator used in symbol=
names configurable<br> (Miod Vallat, review by Hugo Heuzard and Xavi=
er Leroy)<br><br>- #12691 : Clean up Ctype.expand_abbrev_gen and<br> =
rename Env.add_local_type to add_local_constraint<br> (Takafumi Saika=
wa and Jacques Garrigue, review by Florian Angeletti)<br><br>- #12786 : Cle=
an up the algorithm of Ctype.limited_generalize<br> (Takafumi Saikawa=
and Jacques Garrigue, review by Gabriel Scherer)<br><br>- #10691: Ast_mapp=
er, Ast_iterator: add functions directive_argument,<br> toplevel_dire=
ctive and toplevel_phrase.<br> (Guillaume Petiot, review by Gabriel S=
cherer and Kate Deplaix)<br><br>- #12764: Move all installable headers in `=
caml/` sub-directories.<br> (Antonin D=C3=A9cimo, review by Gabriel S=
cherer and David Allsopp)<br><br>- #12914: Slightly change the s390x assemb=
ly dialect in order to build with<br> Clang's integrated assembler.<b=
r> (Miod Vallat, review by Gabriel Scherer)<br><br>- #13001: do not r=
ead_back entire shapes to get aliases' uids when building the<br> usa=
ges index<br> (Ulysse G=C3=A9rard, review by Gabriel Scherer and Nath=
ana=C3=ABlle Courant)<br><br>### Build system:<br><br>- #12198, #12321, #12=
586, #12616, #12706, #13048: continue the merge of the<br> sub-makefi=
les into the root Makefile started with #11243, #11248,<br> #11268, #=
11420 and #11675.<br> (S=C3=A9bastien Hinderer, review by David Allso=
pp and Florian Angeletti)<br><br>- #12569, #12570: remove 'otherlibraries' =
as a prerequisite for 'runtop';<br> use 'runtop-with-otherlibs' to us=
e a library from otherlibs/<br> (Gabriel Scherer, review by S=C3=A9ba=
stien Hinderer, suggestion by David Allsopp)<br><br>- #12652: Make magic nu=
mbers easier to bump and duplicate.<br> (S=C3=A9bastien Hinderer, rev=
iew by Antonin D=C3=A9cimo, David Allsopp and Florian<br> Angeletti)<=
br><br>* #12751: --with-target-bindir configure option implemented. This op=
tion<br> refers to the location of the runtime binaries on the target=
system for a<br> cross-compiler and is embedded in executables produ=
ced by ocamlc. It does<br> not affect the bytecode executables instal=
led as part of the build. The old<br> mechanism `make TARGET_BINDIR=
=3D..` no longer works.<br> (David Allsopp, review by Damien Doligez,=
Xavier Leroy and Olivier Nicole)<br><br>- #12768, #13030: Detect mingw-w64=
coupling with GCC or LLVM, detect clang-cl,<br> and fix C compiler f=
eature detection on macOS.<br> (Antonin D=C3=A9cimo, review by Miod V=
allat and S=C3=A9bastien Hinderer)<br><br>### Bug fixes:<br><br>- #10652, #=
12720: fix evaluation order in presence of optional arguments<br> (Ja=
cques Garrigue, report by Leo White, review by Vincent Laviron)<br><br>- #1=
2595, #12597: fix a race in `caml_clear_gc_stats_sample`<br> (Gabriel=
Scherer, review by B. Szilvasy, report by B. Szilvasy)<br><br>- #12580: Fi=
x location of alias pattern variables.<br> (Chris Casinghino, review =
Gabriel Scherer, report by Milo Davis)<br><br>- #12583: Add a closing event=
for when `EV_MAJOR_EPHE_MARK` is complete<br> (Sudha Parimala, revie=
w by Gabriel Scherer)<br><br>- #12566: caml_output_value_to_malloc wrongly =
uses `caml_stat_alloc`<br> instead of `malloc` since 4.06, breaking (=
in pooled mode) user code<br> that uses `free` on the result. Symmetr=
ically,<br> caml_input_value_from_malloc should use `free`.<br> =
(Gabriel Scherer, review by Xavier Leroy and Enguerrand Decorne,<br> =
report by Ido Yariv)<br><br>- #12490: Unix: protect the popen_proces=
ses hashtable with a mutex<br> (Gabriel Scherer, report by Olivier Ni=
cole, review by Xavier Leroy)<br><br>- #11931: Fix tricky typing bug with t=
ype substitutions<br> (Stephen Dolan, review by Leo White and Jacques=
Garrigue)<br><br>- #12037, #12171: Fix get_extern_state potential NULL der=
eference.<br> (Alexander Skvortsov, report by T=C3=B6r=C3=B6k Edwin,<=
br> design by Gabriel Scherer, Xavier Leroy)<br><br>- #12635: F=
ix get_intern_state potential NULL dereference.<br> (Antonin D=C3=A9c=
imo, review by KC Sivaramakrishnan)<br><br>- #12032, #12059: Bug fixes rela=
ted to compilation of recursive definitions<br> (Vincent Laviron, rep=
ort by Victoire Noizet, review by Gabriel Scherer)<br><br>* #12145: Loopy c=
onstraints cause ocamlc to loop.<br> Fixed by completely removing the=
call to `update_type` in<br> `Typedecl.transl_type_decl`, as the exp=
ansion is already checked by<br> `check_regularity`. As a result, rec=
ursion is more polymorphic,<br> which may cause some (essentially wro=
ng) type declarations to have<br> unbound type variables, and some co=
nstraints unrelated to the concrete<br> type to be ignored (see tests=
/typing-misc/constraints.ml).<br> (Jacques Garrigue, report by Richar=
d Eisenberg, review by Leo White)<br><br>- #12207, #12222: Make closure com=
putation linear in the number of recursive<br> functions instead of q=
uadratic<br> (Vincent Laviron, report by Fran=C3=A7ois Pottier, revie=
w by Nathana=C3=ABlle Courant<br> and Gabriel Scherer)<br><br>- #1104=
0, #12591: fix a data race in major_gc.c<br> (Gabriel Scherer, review=
by Guillaume Munch-Maccagnoni<br> and KC Sivaramakrishnan, rep=
ort by Sadiq Jaffer)<br><br>- #12238, #12403, #12698: read input files in o=
ne go to avoid source reprinting<br> issues.<br> (Gabriel Scher=
er, report by Mike Spivey and Vincent Laviron, review by<br> Ni=
col=C3=A1s Ojeda B=C3=A4r, Xavier Leroy and Jeremy Yallop)<br><br>- #12334,=
#12368: Bad error message with mutually recursive abbreviations<br> =
(Jacques Garrigue, report by Richard Eisenberg, review by Gabriel Scherer<b=
r> and Richard Eisenberg)<br><br>- #12401: `seek_in` and `seek_=
out` sometimes returned normally when given<br> negative offsets, ins=
tead of failing. Now both functions should consistently<br> raise `Sy=
s_error` in this case.<br> (Nicol=C3=A1s Ojeda B=C3=A4r, review by Ga=
briel Scherer)<br><br>- #12267: Fix stack alignment computation<br> (=
Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)<br><br>- #=
12395, #12404: Fix thread-unsafety in the fallback implementation of<br>&nb=
sp; `Unix.create_process` (the one used when `posix_spawnp` is unavailable)=
<br> (Xavier Leroy, report by Chris Vine, review by Nicol=C3=A1s Ojed=
a B=C3=A4r)<br><br>- #12949: open shadowing mistriggers<br> (Gabriel =
Scherer, review by Florian Angeletti, report by Andreas Rossberg)<br><br>- =
#12526: Honor `ocaml.inline always` attribute on functions with<br> o=
ptional arguments and default values in the Closure backend<br> (Alai=
n Frisch, review by Vincent Laviron)<br><br>- #12677, #12889: make Domain.D=
LS thread-safe<br> (Gabriel Scherer, review by Olivier Nicole and Dam=
ien Doligez,<br> report by Vesa Karvonen)<br><br>- #12561: Fix =
crash when combining TSan and frame-pointers<br> (Fabrice Buoro and O=
livier Nicole, report by Jan Midtgaard, review by Miod<br> Vallat and=
Gabriel Scherer)<br><br>- #12482: Rework bounds checking code in the POWER=
backend<br> (Miod Vallat and Xavier Leroy, report by Jan Midtgaard, =
review by<br> KC Sivaramakrishnan)<br><br>- #12528, #12703: Avo=
id pointer arithmetic overflow in Tag_val macro<br> (very likely harm=
less, but can trigger alarms)<br> (Xavier Leroy, report by Sam Goldma=
n, review by Guillaume Munch-Maccagnoni)<br><br>- #12593: TSan should handl=
e Effect.Unhandled correctly<br> (Fabrice Buoro and Olivier Nicole, r=
eport by Jan Midtgaard and Miod Vallat,<br> review by Gabriel S=
cherer)<br><br>- #12684: fix locations filename in AST produced by the `-pp=
` option<br> (Gabriel Scherer, review by Florian Angeletti)<br><br>- =
#12714: check whether macros are defined before using them to ensure<br>&nb=
sp; that the headers can always be used in code which turns on -Wundef<br>&=
nbsp; (or equivalent).<br> (Antonin D=C3=A9cimo, review by Miod Valla=
t, Gabriel Scherer,<br> Xavier Leroy, and David Allsopp)<br><br=
>- #12726: fix segmentation fault under Windows when executing a bytecode f=
ile if<br> the runtime (`ocamlrun.exe`) cannot be found.<br> (V=
adim Zborovskii, Nicol=C3=A1s Ojeda B=C3=A4r, report by Vadim Zborovskii, r=
eview by<br> David Allsopp)<br><br>- #12727, #12730: fix bug with val=
ue let-rec and labelled applications<br> (Vincent Laviron, review by =
Gabriel Scherer)<br><br>* #12751: Always keep within the 128 character limi=
t for shebang lines. Previous<br> fix in #8622 handled building the c=
ompiler with a long prefix; this patch<br> extends this to the byteco=
de executables emitted by that compiler.<br> (David Allsopp, review b=
y Damien Doligez, Xavier Leroy and Olivier Nicole)<br><br>- #12755: Fix dat=
a race on global pools arrays of pool_freelist<br> (Fabrice Buoro and=
Olivier Nicole, review by Gabriel Scherer)<br><br>- #12796, #12801: Fix me=
mory corruption in caml_unix_alloc_sockaddr<br> (Thomas Leonard, revi=
ew by Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #12737: Fix data races in minor=
_gc.c and caml_natdynlink_open<br> (Olivier Nicole, review by Stefan =
Muenzel, Miod Vallat, Guillaume<br> Munch-Maccagnoni, Gabriel S=
cherer and Xavier Leroy)<br><br>- #12831: Fix call to caml_call_realloc_sta=
ck for s390x in PIC mode<br> (Vincent Laviron, report by Jerry James,=
review by Miod Vallat)<br><br>* #12837: Show non-generalizable type parame=
ters in type definitions<br> Changes type of type parameters in outco=
metree.mli.<br> (Jacques Garrigue, review by Richard Eisenberg)<br><b=
r>- #12897: fix locking bugs in Runtime_events<br> (Gabriel Scherer a=
nd Thomas Leonard,<br> review by Olivier Nicole, Vincent Laviro=
n and Damien Doligez,<br> report by Thomas Leonard)<br><br>- #1=
2851: Fix race between runtime events teardown and event emission<br> =
(Olivier Nicole, review by Miod Vallat and Gabriel Scherer)<br><br>- #1286=
0: Fix an assertion that wasn't taking into account the possibility of an<b=
r> ephemeron pointing at static data.<br> (Mark Shinwell, revie=
w by Gabriel Scherer and KC Sivaramakrishnan)<br><br>- #12861: Fix a possib=
le crash in the `threads` library.<br> (Mark Shinwell, review by Gabr=
iel Scherer and KC Sivaramakrishnan)<br><br>- #11040, #12894: Silence false=
data race observed between caml_shared_try_alloc<br> and oldify. Int=
roduces macros to call tsan annotations which help annotate<br> a ``h=
appens before'' relationship.<br> (Hari Hara Naveen S and Olivier Nic=
ole,<br> review by Gabriel Scherer and Miod Vallat)<br><br>- #1=
2958: Fix tail-modulo-cons compilation of try-with, && and ||<br>&n=
bsp; expressions.<br> (Gabriel Scherer and Nicol=C3=A1s Ojeda B=C3=A4=
r, report by Sylvain Boilard, review by<br> Gabriel Scherer)<br><br>-=
#12919: Fix register corruption in caml_callback2_asm on s390x.<br> =
(Miod Vallat, review by Gabriel Scherer)<br><br>- #12924, #12930: Rework pa=
ckage constraint checking to improve interaction with<br> immediacy<b=
r> (Chris Casinghino and Florian Angeletti, review by Florian Angelet=
ti and<br> Richard Eisenberg)<br><br>- #12969: Fix a data race =
in caml_darken_cont<br> (Fabrice Buoro and Olivier Nicole, review by =
Gabriel Scherer and Miod Vallat)<br><br>- #12971, #12974: fix an uncaught C=
type.Escape exception on some<br> invalid programs forming recursive =
types.<br> (Gabriel Scherer, review by Florian Angeletti, report by N=
even Villani)<br><br>- #13019: Remove linking instructions for the Unix lib=
rary from threads.cma<br> (this was done for threads.cmxa in OCaml 3.=
11). Eliminates warnings from<br> new lld when using threads.cma of d=
uplicated libraries.<br> (David Allsopp, review by Nicol=C3=A1s Ojeda=
B=C3=A4r)<br><br>- #13058: Add TSan instrumentation to caml_call_gc(), sin=
ce it may raise<br> exceptions.<br> (Fabrice Buoro, Olivier Nic=
ole, Gabriel Scherer and Miod Vallat)<br><br>- #13079: Save and restore fra=
me pointer across Iextcall on ARM64<br> (Tim McGilchrist, review by K=
C Sivaramakrishnan and Miod Vallat)<br><br>- #13094: Fix undefined behavior=
of left-shifting a negative number.<br> (Antonin D=C3=A9cimo, review=
by Miod Vallat and Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #13130: minor fix=
es to pprintast for raw identifiers and local module open<br> syntax =
for types.<br> (Chet Murthy, review by Gabriel Scherer)<br></div></di=
v></div></body></html>
--=_f5742199-6837-4d9b-8851-db800dd67f00--