From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.134.164.83; helo=mail2-relais-roc.national.inria.fr; envelope-from=caml-list-owner@inria.fr; receiver= Authentication-Results: plum; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: plum.tunbury.org; dkim=pass (1024-bit key; unprotected) header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=G3u0Vi0L; dkim=fail reason="signature verification failed" (1024-bit key) header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=g3OIyw3x; dkim-atps=neutral Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by plum.tunbury.org (Postfix) with ESMTPS id A8666B80123 for ; Mon, 13 May 2024 15:29:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:message-id:mime-version:subject:reply-to: sender:list-id:list-help:list-subscribe:list-unsubscribe: list-post:list-owner:list-archive; bh=KlQWp7U8riV0oNMhoUbUmqO7XYK/hqC0ePrHs10oGmw=; b=G3u0Vi0LTihTlZjBuFofFae5VZbMCrR9hh1ObfLbJMYxFU+3x1H+MyPW vLTSDFBzlxb1i+5E3FQI3ZP6L3iSb+RVcViCsK7jygwAVa6Ay5QzmoZii /hEP2OsliTTm188GP089SJwfBT1ec2SmRUf/AxC3Y4Ci1RzRhdxI1V8k8 Q=; Received-SPF: Pass (mail2-relais-roc.national.inria.fr: domain of caml-list-owner@inria.fr designates 128.93.162.160 as permitted sender) identity=mailfrom; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="caml-list-owner@inria.fr"; x-sender="caml-list-owner@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 include:mailout.safebrands.com a:basic-mail.safebrands.com a:basic-mail01.safebrands.com a:basic-mail02.safebrands.com ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@sympa.inria.fr) identity=helo; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="caml-list-owner@inria.fr"; x-sender="postmaster@sympa.inria.fr"; x-conformance=spf_only Authentication-Results: mail2-relais-roc.national.inria.fr; spf=Pass smtp.mailfrom=caml-list-owner@inria.fr; spf=None smtp.helo=postmaster@sympa.inria.fr; dkim=hardfail (signature did not verify [final]) header.i=@inria.fr X-IronPort-AV: E=Sophos;i="6.08,158,1712613600"; d="scan'208,217";a="165468108" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 13 May 2024 16:29:04 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 1240EE0CD2; Mon, 13 May 2024 16:29:04 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 8B45BE0AF1 for ; Mon, 13 May 2024 16:28:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:message-id:subject:mime-version; bh=KlQWp7U8riV0oNMhoUbUmqO7XYK/hqC0ePrHs10oGmw=; b=g3OIyw3x84Y0gYdg4QZmim6tc77v1vp6RyJqyGVDkeNe91bYbGuRgRUd mD55aIAqg2YxM16WuK6oLSuNHFzbJcdf5ulh6D1FgOi7lehtloonZJSJ9 zBSNHY2kCh9UexkfDRFL49QrHD1lyImcG29Y6AQRRqUul/rqge2tr7Yjy k=; X-IronPort-AV: E=Sophos;i="6.08,158,1712613600"; d="scan'208,217";a="165468057" X-MGA-submission: =?us-ascii?q?MDHc4IkKW24Ily4peE5P1zOg446WMlfFWo8plx?= =?us-ascii?q?Q2d0TzGexghZSZIw0lSC45dwdS+a7U+o3dp5SYrQN0tKVklesxHclwHI?= =?us-ascii?q?twtQtOdX61/3O4xofGP55TXHRNVI2BnNlzf1HbC/QExawRgjdkvCIagg?= =?us-ascii?q?nsndHbiyP6nFBd60jYul07tg=3D=3D?= Received: from zcs2-store1.inria.fr ([128.93.142.3]) by mail2-relais-roc.national.inria.fr with ESMTP; 13 May 2024 16:28:55 +0200 Date: Mon, 13 May 2024 16:28:55 +0200 (CEST) From: Florian Angeletti To: caml-list Message-ID: <268032759.14812063.1715610535048.JavaMail.zimbra@inria.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_78db1b8c-e0a0-4bea-98e2-9be53ec9c931" X-Originating-IP: [128.93.64.106] X-Mailer: Zimbra 10.0.8_GA_4611 (ZimbraWebClient - FF125 (Linux)/10.0.8_GA_4611) Thread-Index: YfWsHEkrfR8HsOuwyTqYADiM/Xefhg== Thread-Topic: OCaml 5.2.0 released Subject: [Caml-list] OCaml 5.2.0 released Reply-To: Florian Angeletti X-Loop: caml-list@inria.fr X-Sequence: 19127 Errors-To: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --=_78db1b8c-e0a0-4bea-98e2-9be53ec9c931 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 ocaml-variants.5.1.0+options = =20 where `` 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 --=_78db1b8c-e0a0-4bea-98e2-9be53ec9c931 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Dear OCaml users,

We have the pleasu= re of celebrating the birthday of Inge Lehmann by announcing the
release= of OCaml version 5.2.0.

Some of the highlights in OCaml 5.2.0 are:<= /div>

- Re-introduced GC compaction
  GC compaction can now= be manually triggered by calling `Gc.compact ()` manually.
  This = is expected to be particularly useful for programs that wish to release mem= ory
  to the operating system after a temporary memory-intensive ph= ase.

- Restored native backend for POWER 64 bits
  Wi= th this restored backend, all 64 bits architecture supported in OCaml 4 are=
  supported bin OCaml 5

- Thread sanitizer support
 = ; Thread sanitizer is a dynamic data race detector which instrument memory<= br>  accesses to detect and explain data races at execution time. Sinc= e the
  instrumentation is costly (with a 2x to 7x slowdown), it mu= st be enabled with
  the `ocaml-option-tsan` configuration flag. (T= he reference manual contains
  more information on how to use TSAN.= )

- New Dynarray module
  This new standard library module p= rovides a standard implementation for resizeable array,
  which is = guaranteed to be memory safe even in presence of data races.

- New -= H flag for hidden include directories
  This new flag makes it poss= ible for build tools to split cleanly dependencies
  between direct= (the dependencies explicitly added by the project) and indirect
  = dependencies (the dependencies introduced by the direct dependencies) witho= ut
  the quirks of previous implementations.

- Project-wide = occurence metadata support for developer tools
  When compiling a m= odule with the `-bin-annot` and `-bin-annot-occurrences`
  flags, t= he compiler stores in the `.cmt` file an index of all occurences of
&nbs= p; values, types, modules, ...

- Raw identifiers
  To improv= e OCaml upward-compatibility, there is a new syntax for lowercase
 = identifiers, `let \#if =3D 0`, which works even if the identifier is a key= word
  in some OCaml versions. This change has been adopted in OCam= l 5.2 in
  preparation of the introduction of the `effect` keyword = in OCaml 5.3

- Local open in type expressions
  Local open a= re now allowed in type expression: `val (+): Int64.(t -> t -> t)`.
And a lot of incremental changes:

- Around 20 new functi= ons in the standard library besides the new Dynarray module
  (in t= he `Array`, `Float`, `Format`, `Fun`, `In_channel`, `Out_channel`, and `Ran= dom` modules )

- Many fixes and improvements in the runtime
- Man= y bug fixes

OCaml 5.2.0 is still a somewhat experimental release com= pared to the OCaml
4.14 branch. In particular

   - The = Windows MSVC port is still unavailable.
   - Ephemeron perform= ances need to be investigated.
   - `statmemprof` is being tes= ted in the developer branch of OCaml.
   - There are a number = of known runtime concurrency or GC performance bugs
   &n= bsp; (that trigger under rare circumstances).

Since the Windows MSVC= port and statmemprof are still missing, the maintenance
support for OCa= ml 4.14 will be extended until at least the end of the year.

Please = report any unexpected behaviours on the OCaml issue tracker (https://github= .com/ocaml/ocaml/issues)
and post any questions or comments you might ha= ve on our discussion forums (https://discuss.ocaml.org).

The full li= st of changes can be found in the changelog below.

Happy hacking,=E2=80=94 Florian Angeletti for the OCaml team.

Installation Instru= ctions
------------------------------

The base compiler can be in= stalled as an opam switch with the following commands:

  &= nbsp; opam update
    opam switch create 5.2.0

The= source code for the release candidate is also directly available on:
* GitHub: https://github.com/ocaml/ocaml/archive/5.2.0.tar.gz
* OCaml = archives at Inria: https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.0.= tar.gz

Fine-Tuned Compiler Configuration
------------------------= ----------------------

If you want to tweak the configuration of the= compiler, you can switch to the option variant with:

  &n= bsp; opam update
    opam switch create <switch_name&g= t; ocaml-variants.5.1.0+options <option_list>

where `<optio= n_list>` is a qpace separated list of `ocaml-option-*` packages. For ins= tance, for a `flambda` and `no-flat-float-array` switch:

  = ;  opam switch create 5.2.0+flambda+nffa ocaml-variants.5.2.0+options = ocaml-option-flambda ocaml-option-no-flat-float-array

Changes in OCa= ml 5.2.0 (13 May 2024)
------------------------------------

(Chan= ges that can break existing programs are marked with a "*")

### Rest= ored backends:

- #12276, #12601: native-code compilation for POWER (= 64 bits, little-endian)
  (Xavier Leroy, review by KC Sivaramakrish= nan, Anil Madhavapeddy,
   and Stephen Dolan)

- #12667:= extend the latter to POWER 64 bits, big-endian, ELFv2 ABI
  (A. Wi= lcox, review by Xavier Leroy)

### Runtime system:

- #12193: R= e-introduce GC compaction for shared pools
  Adds a parallel compac= tor for the shared pools (which contain major heap
  blocks sized l= ess than 128 words). Explicit only for now, on calls to
  `Gc.compa= ct`.
  (Sadiq Jaffer, Nick Barnes, review by Anil Madhavapeddy, Dam= ien Doligez,
   David Allsopp, Miod Vallat, Artem Pianykh, Ste= phen Dolan, Mark Shinwell
   and KC Sivaramakrishnan)

-= #12114: Add ThreadSanitizer support
  (Fabrice Buoro and Olivier N= icole, based on an initial work by Anmol Sahoo,
   review by D= amien Doligez, S=C3=A9bastien Hinderer, Jacques-Henri Jourdan, Luc
 = ;  Maranget, Guillaume Munch-Maccagnoni, Gabriel Scherer)


-= #12850: Update Gc.quick_stat data at the end of major cycles and compactio= n
  This PR adds an additional caml_collect_gc_stats_sample_stw to = the major heap
  cycling stw. This means that Gc.quick_stat now act= ually reflects the state of
  the heap after a major cycle or compa= ction.
  (Sadiq Jaffer, review by Miod Vallat and Gabriel Scherer)<= br>
- #12859: Ensure Gc.compact does a full major before the compactor r= uns
  (Sadiq Jaffer, review by Leo White, Mark Shinwell, Gabriel Sc= herer,
   Josh Berdine, David Allsopp and KC Sivaramakrishnan)=

- #10111: Increase the detail of location information for debugging= events to
  allow the end line number and character offset to be r= eported.
  (David Allsopp, review by Nick Barnes, Enguerrand Decorn= e and Stephen Dolan)

- #10403, #12202: introduce `caml_ext_table_add= _noexc` that does not
  raise `Out_of_memory` exceptions and use it= inside the blocking sections
  of `caml_read_directory`.  Als= o, check for overflows in ext table sizes.
  (Xavier Leroy, report = by Arseniy Alekseyev, review by Gabriel Scherer)

- #11332, #12702: m= ake sure `Bool_val(v)` has type `bool` in C++
  (Xavier Leroy, repo= rt by ygrek, review by Gabriel Scherer)

- #12772, #12787: Avoid usin= g _Bool in public headers for the sake of C++
  compatibility
&n= bsp; (Guillaume Munch-Maccagnoni, report by KC Sivaramakrishnan, review
=   by Xavier Leroy and KC Sivaramakrishnan)

- #12223: Constify c= onstructors and flags tables in C code. Now these
  tables will go = in the readonly segment, where they belong.
  (Antonin D=C3=A9cimo,= review by Gabriel Scherer and Xavier Leroy)

- #12234: make instrume= nted time calculation more thread-safe on macOS.
  (Anil Madhavaped= dy, review by Daniel B=C3=BCnzli and Xavier Leroy)

- #12235, #12468:= introduce and use the `CAMLnoret` macro as
  a lighter alternative= to `CAMLnoreturn_start` / `CAMLnoreturn_end`.
  Implement it so as= to conform with C11, C23, C++11, C++17.
  (Xavier Leroy and Dhruv = Maroo, with help from Antonin D=C3=A9cimo, review by
   Gabrie= l Scherer and David Allsopp)

- #12275: caml/stack.h: more abstract m= acros to describe OCaml stacks and
  how to traverse them, supporti= ng more stack layouts.
  (Xavier Leroy, review by KC Sivaramakrishn= an and Fabrice Buoro)

- #12268: deliver `Out_of_memory` exception if= domain creation fails
  due to memory resource exhaustion.  I= t was previous always a `Failure`.
  (Anil Madhavapeddy, review by = David Allsopp)

- #12300, #12314: Discard out_channel buffered data o= n permanent I/O error
  (Xavier Leroy, report by T=C3=B6r=C3=B6k Ed= win, review by Anil Madhavapeddy
  and Nicol=C3=A1s Ojeda B=C3=A4r)=

- #11386: Simplifications and fixes to multicore systhreads impleme= ntation.
  (Guillaume Munch-Maccagnoni, review by Anil Madhavapeddy= and KC
   Sivaramakrishnan)

- #12875, #12879, #12882: = Execute preemptive systhread switching as a
  delayed pending actio= n. This ensures that one can reason within the
  FFI that no mutati= on happens on the same domain when allocating on
  the OCaml heap f= rom C, consistently with OCaml 4. This also fixes
  further bugs wi= th the multicore systhreads implementation.
  (Guillaume Munch-Macc= agnoni, bug reports and suggestion by Mark
   Shinwell, review= by Nick Barnes and Stephen Dolan)

- #12408: `Domain.spawn` no longe= r leaks its functional argument for
  the whole duration of the chi= ldren domain lifetime.
  (Guillaume Munch-Maccagnoni, review by Gab= riel Scherer)

- #12409: Fix unsafety and deadlocks should an asynchr= onous exception
  arise at specific locations during domain creatio= n and shutdown.
  (Guillaume Munch-Maccagnoni, review by Gabriel Sc= herer)

- #11911, #12381: Restore statmemprof functionality in part, = with
  some API changes in Gc.Memprof.
  (Nick Barnes, revi= ew by Jacques-Henri Jourdan
   and Guillaume Munch-Maccagnoni)= .

- #12430: Simplify dynamic bytecode loading in Meta.reify_bytecode=
  (Stephen Dolan, review by S=C3=A9bastien Hinderer, Vincent Lavir= on and Xavier
   Leroy)

- #12489: Fix an error-handling= bug in caml_alloc_sprintf
  (Stephen Dolan, report by Chris Casing= hino, review by Jeremy Yallop
   and Xavier Leroy)

- #1= 1307: Finish adapting the implementation of asynchronous actions for
&nb= sp; multicore: soundness, liveness, and performance issues.
  Do no= t crash if a signal handler is called from an unregistered C
  thre= ad, and other possible soundness issues. Prevent issues where join
 = ; on other domains could make the toplevel unresponsible to Ctrl-C. Avoid  needless repeated polling in C code when callbacks cannot run
&= nbsp; immediately.
  (Guillaume Munch-Maccagnoni, review by Enguerr= and Decorne, Xavier
  Leroy, and KC Sivaramakrishnan)

- #126= 34: Simplify TSan backtrace bookkeeping upon raise
  (Olivier Nicol= e and Fabrice Buoro, review by Gabriel Scherer)

* #12686: Some primi= tives had the wrong types to be callable from the bytecode
  interp= reter.  Either fix their types, mark them as `CAMLexport` instead of  `CAMLprim`, or remove them entirely if no longer used.
  (= Xavier Leroy, review by David Allsopp)

- #12700, continuing #11763 a= nd trying to address #12660:
  Use the correct types for primitives= when generating the table of primitives
  used by ocamlrun.
&nb= sp; (Xavier Leroy, motivation, review and improvements by Antonin D=C3=A9ci= mo)

- #12345, #12710: Fix issues with finaliser orphaning at domain = termination
  (KC Sivaramakrishnan, report by Gabriel Scherer, revi= ew by Gabriel Scherer,
  Sadiq Jaffer and Fabrice Buoro)

- #= 12599: Refactor Dynlink startup to avoid parsing bytecode sections twice  (Stephen Dolan, review by David Allsopp, Hugo Heuzard, Damien Dolig= ez and
   Xavier Leroy)

- #12678, #12898: free channel = buffers on close rather than on finalization
  (Damien Doligez, rev= iew by Jan Midtgaard and Gabriel Scherer, report
   by Jan Mid= tgaard)

- #12681: Fix TSan false positives due to volatile write han= dling
  (Olivier Nicole, Fabrice Buoro and Anmol Sahoo, review by L= uc Maranget,
   Gabriel Scherer, Hernan Ponce de Leon and Xavi= er Leroy)

- #12743: Use pthread_sigmask instead of sigprocmask
&n= bsp; Updates usage of sigprocmask to pthread_sigmask in otherlibs/unix.
=   (Max Slater, review by Miod Vallat and Xavier Leroy)

- #12769= : Unify MSVC and MinGW-w64 code paths, by always using WinAPI
  dir= ectly.
  (David Allsopp, Antonin D=C3=A9cimo, and Samuel Hym, revie= w by Nicolas
   Ojeda Bar)

- #11911, #12382, #12383: Re= store statmemprof functionality in part
  (backtrace buffers, per-t= hread and per-domain data structures,
  GC/allocation interface). (= Nick Barnes, review by Gabriel Scherer,
  Fabrice Buoro, Sadiq Jaff= er, Guillaume Munch-Maccagnoni, and
  Jacques-Henri Jourdan).
- #12735: Store both ends of the stack chain in continuations
  (= Leo White, review by Miod Vallat and KC Sivaramakrishnan)

- #12746: = Simplify and clean up TSan annotations
  (Olivier Nicole, review by= Miod Vallat and Fabrice Buoro)

- #12809: Add ThreadSanitizer suppor= t to FreeBSD/amd64
  (Miod Vallat, review by Gabriel Scherer)
- #12810: Port ThreadSanitizer support to Linux and macOS on arm64
&nb= sp; (Miod Vallat, review by Tim McGilchrist)

- #12811: Define and us= e the CAMLthread_local macro for TLS variables.
  (Antonin D=C3=A9c= imo and Samuel Hym, review by Miod Vallat and Xavier Leroy)

- #12814= : More detailed failure messages from `input_value` and `Marshal.from_*`  (Xavier Leroy, review by Stephen Dolan and Anil Madhavapeddy)
- #12815: Correctly format multi-line locations in exception backtraces, = in the
  style that the compiler driver uses.
  (David Alls= opp, review by Gabriel Scherer)

- #12773, #12830, #12834: Rewrite `c= aml_c_thread_(un)register` to fix
  various bugs.
  (Guilla= ume Munch-Maccagnoni, reported by Miod Vallat, suggested by
  = Hari Hara Naveen S, reviewed by Fabrice Buoro, Gabriel Scherer and
&nbs= p;  Miod Vallat)

- #12876: Port ThreadSanitizer support to Linu= x on POWER
  (Miod Vallat, review by Tim McGilchrist)

- #128= 86: Reinitialize IO mutexes after fork
  (Max Slater, review by Gui= llaume Munch-Maccagnoni and Xavier Leroy)

- #12907: Port ThreadSanit= izer support to Linux on RiscV
  (Miod Vallat, review by Nicol=C3= =A1s Ojeda B=C3=A4r and Fabrice Buoro)

- #12915: Port ThreadSanitize= r support to Linux on s390x
  (Miod Vallat, review by Tim McGilchri= st)

- #12934: Fix data races between marking and sweeping functions<= br>  (Olivier Nicole, suggested by Stephen Dolan, review by Gabriel Sc= herer,
   Miod Vallat and Damien Doligez)

### Language = features:

- #12295, #12568: Give `while true' a polymorphic type, si= milarly to
  `assert false'
  (Jeremy Yallop, review by Nic= ol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer,
  suggestion by Rodol= phe Lepigre and John Whitington)

- #12044: Add local module open syn= tax for types.
  ```
    module A =3D struct
&= nbsp;     type t =3D int
    &nb= sp; type r =3D unit
      type s =3D string
=     end

    type example =3D A.(t * r = * s)
  ```
  (Alistair O'Brien, review by Gabriel Scherer, = Nicol=C3=A1s Ojeda B=C3=A4r
   and Florian Angeletti)

-= #11252, RFC 27: Support raw identifier syntax \#foo
  (Stephen Dol= an, review by David Allsopp, Gabriel Scherer and Olivier Nicole)

- #12315: Use type annotations from arguments in let rec
  (Stephe= n Dolan, review by Gabriel Scherer)

- #12375: allow use of [@untagge= d] for all immediate types like char, bool,
  and variant with only= constant constructors.
  (Christophe Raffalli, review by Gabriel S= cherer)

* #12502: the compiler now normalizes the newline sequence \= r\n to
  a single \n character during lexing, to guarantee that the= semantics
  of newlines in string literals is not modified by Wind= ows tools
  transforming \n into \r\n in source files.
  Wa= rning 29 [eol-in-string] is not emitted anymore, as the normalization
&n= bsp; gives a more robust semantics to newlines in string literals.
 = ; (Gabriel Scherer and Damien Doligez, review by Daniel B=C3=BCnzli, David<= br>   Allsopp, Andreas Rossberg, Xavier Leroy, report by Andreas = Rossberg)

### Standard library:

- #11563: Add the Dynarray mo= dule to the stdlib. Dynamic arrays are
  arrays whose length can be= changed by adding or removing elements at
  the end, similar to 'v= ectors' in C++ or Rust.
  (Gabriel Scherer, Simon Cruanes and Flori= an Angeletti, review by
   Daniel B=C3=BCnzli, Guillaume Munch= -Maccagnoni, Cl=C3=A9ment Allain,
   Damien Doligez, Wiktor Ku= chta and Pieter Goetschalckx)


- #12716: Add `Format.pp_print_not= hing` function.
  (L=C3=A9o Andr=C3=A8s, review by Gabriel Scherer = and Nicol=C3=A1s Ojeda B=C3=A4r)

* #6732, #12423: Make Buffer.add_su= bstitute surjective and fix its
  documentation.
  (Damien = Doligez, review by Antonin D=C3=A9cimo)

* #10775, #12499: Half-preci= sion floating-point elements in Bigarray.
  (Anton Yabchinskiy, rev= iew by Xavier Leroy and Nicol=C3=A1s Ojeda B=C3=A4r)

- #11517, #1247= 7: Expose pp_infinity in interface of the format module, and
  chec= k that margin is less than pp_infinity when setting or checking geometry.  (Janith Petangoda, reported by Simmo Saan, reviewed by Florian Ang= eletti,
  Simmo Saan, Josh Berdine and Gabriel Scherer)

- #1= 2217: Add `Array.shuffle`.
  (Daniel B=C3=BCnzli, review by Nicol= =C3=A1s Ojeda B=C3=A4r, David Allsopp and Alain Frisch)

- #12212: Ad= d cache-aligned constructor for atomics. The patch ensures that
  a= ll allocations (of the right size) in the shared heap are aligned.
 = ; (Bartosz Modelski with Gabriel Scherer, Guillaume Munch-Maccagnoni,
&n= bsp;  Xavier Leroy, review by Alain Frisch, Anil Madhavapeddy, Gabriel= Scherer,
   Guillaume Munch-Maccagnoni, KC Sivaramakrishnan, = Stefan Muenzel,
   Xavier Leroy)

- #12307: Add BLAKE2b = hashing and an MD5 submodule to the Digest module.
  (Xavier Leroy,= review by Olivier Nicole, Gabriel Scherer, Wiktor Kuchta,
   = Daniel B=C3=BCnzli, David Allsopp)

- #12365: Add In_channel.input_bi= garray, In_channel.really_input_bigarray,
  Out_channel.output_biga= rray, Unix.read_bigarray, Unix.write_bigarray,
  Unix.single_write_= bigarray.
  (Nicol=C3=A1s Ojeda B=C3=A4r, review by Jeremy Yallop, = Xavier Leroy, Gabriel Scherer,
   David Allsopp)

- #124= 55: Add `Array.init_matrix`, `Float.Array.make_matrix`,
  `Float.Ar= ray.init_matrix`.
  (Glen M=C3=A9vel, review by Xavier Leroy, Gabri= el Scherer, Jeremy Yallop,
  Nicolas Ojeda Bar)

* #12455: `A= rray.make_matrix dimx dimy f` now raises `Invalid_argument`
  when = `dimx =3D 0 && dimy < 0` This was already specified but not enfo= rced.
  (Glen M=C3=A9vel, report by Jeremy Yallop, review by Nicola= s Ojeda Bar)

- #12459: Add `Random.int_in_range`, `Random.int32_in_r= ange`,
  `Random.int64_in_range`, `Random.nativeint_in_range`,
&= nbsp; and their counterpart in `Random.State`.
  (Glen M=C3=A9vel a= nd Xavier Leroy, review by Gabriel Scherer, Xavier Leroy,
   F= lorian Angeletti)

- #12459: `Random`: restore compatibility between = 32-bit integers (JavaScript)
  and 63-bit integers (64-bit OCaml).<= br>  For `Random.full_int` this was guaranteed in 4.14 but wrongly rem= oved in 5.0.
  (Xavier Leroy, review by Glen M=C3=A9vel)

- #= 12511: Minor performance improvements and cleanups in the implementation  of modules Int32, Int64, and Nativeint
  (Xavier Leroy, rev= iew by Gabriel Scherer and Daniel B=C3=BCnzli)

- #12558: Adapt GC al= arms for multicore and fix their documentation.
  (Guillaume Munch-= Maccagnoni, review by KC Sivaramakrishnan
   and Gabriel Scher= er)

- #12625: Remove the Closure module from Obj
  (Vincent = Laviron, review by Xavier Leroy)

- #12758, #12998: Remove the `Marsh= al.Compression` flag to the
  `Marshal.to_*` functions.  The c= ompilers are still able to use
  ZSTD compression for compilation a= rtefacts.
  This is a forward port and clean-up of the emergency fi= x that was introduced
  in OCaml 5.1.1 by #12734.
  (Xavier= Leroy, review by Damien Doligez)

- #12784: Fix computation of minor= -heap allocation in Gc.counters()
  and Gc.allocated_bytes(). (Nick= Barnes, review by Gabriel Scherer)

- #12770: Add `Fun.compose`.
=   (Justin Frank, review by Nicol=C3=A1s Ojeda B=C3=A4r, Daniel B=C3=BC= nzli and Jeremy Yallop)

- #12845: Add `{In,Out}_channel.is_binary_mo= de` as the dual of
  `set_binary_mode`. This function was previousl= y only available in the internal
  C API.
  (David Allsopp,= review by Nicol=C3=A1s Ojeda B=C3=A4r and Xavier Leroy)

### Type sy= stem:

- #12313, #11799: Do not re-build as-pattern type when a groun= d type annotation
  is given. This allows to work around problems w= ith GADTs in as-patterns.
  (Jacques Garrigue, report by Leo White,= review by Gabriel Scherer)

### Code generation and optimizations:
- #11239: on x86-64 and RISC-V, reduce alignment of OCaml stacks from= 16 to 8.
  This reduces stack usage.  It's only C stacks that= require 16-alignment.
  (Xavier Leroy, review by Gabriel Scherer a= nd Stephen Dolan)

- #12311: on POWER, 32-bit FP numbers stored in me= mory (e.g. in bigarrays)
  were not correctly rounded sometimes.  (Xavier Leroy, review by Anil Madhavapeddy and Tim McGilchrist)
=
- #12551, #12608, #12782, #12596: Overhaul of recursive value compilati= on.
  Non-function recursive bindings are now forbidden from Lambda= onwards,
  and compiled using a new Value_rec_compiler module.
=   (Vincent Laviron and Lunia Ayanides, review by Gabriel Scherer,
&= nbsp;  Stefan Muenzel and Nathana=C3=ABlle Courant)

- #1809, #1= 2181: rewrite `compare x y op 0` to `x op y` when values are integers
&n= bsp; (Xavier Clerc, Stefan Muenzel, review by Gabriel Scherer and Vincent L= aviron)

- #12825: disable common subexpression elimination for atomi= c loads... again.
  (Gabriel Scherer, review by KC Sivaramakrishnan= , Xavier Leroy
   and Vincent Laviron, report by Vesa Karvonen= )

### Other libraries:

- #12213: Dynlink library, improve leg= ibility of error messages
  (Samuel Hym, review by Gabriel Scherer = and Nicol=C3=A1s Ojeda B=C3=A4r)

* #12686: Runtime_events library, C= API: define
  `caml_runtime_events_{start,pause,resume}` as return= ing `void`
  instead of `value`.
  (Xavier Leroy, review by= David Allsopp)

### Compiler user-interface and warnings:

- #= 11989, #12246, RFC 31: New flag, -H, to allow for transitive dependencies  without including them in the initial environment.
  (Chri= s Casinghino, Fran=C3=A7ois Bobot, and Gabriel Scherer, review by Leo White=
   and Stefan Muenzel, RFC by Fran=C3=A7ois Bobot)

* #10613, #12405: Simplify the values used for the system variable (`syste= m:` in
  `ocamlopt -config` or the `Config.system` constant). In pa= rticular, s390x and
  ppc64 now report "linux" instead of "elf"; al= l variants of 32-bit ARM on Linux
  now report "linux"; OpenBSD now= reports "openbsd" instead of "bsd" for 32-bit
  ARM; FreeBSD, NetB= SD and OpenBSD now report the same value for both x86_64 and
  x86_= 32; x86_32 systems matching *bsd but not freebsd*, netbsd* or openbsd*
&= nbsp; are no longer identified (as on x86_64); x86_32 Linux now reports "li= nux"
  instead of "linux_elf".
  (David Allsopp, request by= Kate Deplaix, review by S=C3=A9bastien Hinderer and
  Xavier Leroy= )

- #12247: configure: --disable-ocamldebug can now be used instead<= br>  of --disable-debugger (which remains available for compatibility)=
  (Gabriel Scherer, review by Damien Doligez and S=C3=A9bastien Hi= nderer)

- #12199: improve the error message for non-overriding `inhe= rit!`
  (Florian Angeletti, review by Jules Aguillon)

- #122= 10: uniform style for inline code in compiler messages
  (Florian A= ngeletti, review by Gabriel Scherer)

* #12278, #:12325: Remove the O= CAML_FLEXLINK environment variable from the
  compiler drivers. Thi= s environment variable was previously used as part of the
  FlexDLL= bootstrap procedure and existed solely for that purpose. Its removal
&n= bsp; greatly simplifies both the build system and testsuite machinery.
&= nbsp; (David Allsopp, review by S=C3=A9bastien Hinderer)

- #12347: e= rror messages: always report missing polyvariant tags
  (Florian An= geletti, report by Tianbo Hao, review by Gabriel Scherer)

- #12224, = specialized error message when trying to apply non-functor
  module= (e.g `module M =3D Int(Int)`)
  (Florian Angeletti, review by Gabr= iel Scherer)

- #12451: Warning 53 (misplaced attributes) now works f= or all attributes.
  (Chris Casinghino, review by Florian Angeletti= )

- #12622: Give hints about existential types appearing in error me= ssages
  (Leo White, review by Gabriel Scherer and Florian Angelett= i)

- #12671: When a class type parameter or class parameter does not= match,
  identify which parameter in the error message, instead of= saying
  "A type parameter" or "A parameter".
  (Stefan Mu= enzel, review by Gabriel Scherer)

- #12679: Add more detail to the e= rror message and manual in case of
  invalid module type substituti= ons.
  (Stefan Muenzel, review by Gabriel Scherer and Florian Angel= etti)

- #12750: Display the command executed to extract primitives i= n
  `ocamlc -verbose`.
  (David Allsopp, review by Nicol=C3= =A1s Ojeda B=C3=A4r)

- #12777: Add details about the actual and expe= cted method types to the method
  mismatch error messages.
 = ; (Javier Ch=C3=A1varri, review by Gabriel Scherer and Florian Angeletti)
* #12942: Fix an line ordering in some module inclusion error message= s
  (Nick Roberts, review by Florian Angeletti, report by Carl East= lund)
### Manual and documentation:

- #12338: clarification of th= e documentation of process related function in
  the unix module re= garding the first element of args and shell's pid.
  (Christophe Ra= ffalli, review by Florian Angeletti)

- #12473: Document in runtime/m= emory.c our current understanding of
  accesses to the OCaml heap f= rom the C runtime code -- the problem
  of hybrid programs mixing t= wo memory models.
  (Gabriel Scherer and Guillaume Munch-Maccagnoni= , review by Olivier
   Nicole and Xavier Leroy)

- #1245= 6: Document the incompatibility between effects on the one
  hand, = and `caml_callback` and asynchronous callbacks (signal
  handlers, = finalisers, memprof callbacks...) on the other hand.
  (Guillaume M= unch-Maccagnoni, review by KC Sivaramakrishnan)

- #12694: Document i= n runtime/tsan.c the TSan instrumentation choices and the
  consequ= ences with regard to the memory model.
  (Olivier Nicole, review by= Miod Vallat, Gabriel Scherer, Guillaume
   Munch-Maccagnoni a= nd Fabrice Buoro)

- #12802: Add manual chapter about ThreadSanitizer= support
  (Olivier Nicole, review by Miod Vallat, Sebastien Hinder= er, Fabrice Buoro,
   Gabriel Scherer and KC Sivaramakrishnan)=

- #12819: Clarify which runtime interactions are allowed in custom = ops
  (Basile Cl=C3=A9ment, review by Guillaume Munch-Maccagnoni an= d Xavier Leroy)

- #12840: manual: update runtime tracing chapter for= custom events (ex #12335)
  (Lucas Pluvinage, Sadiq Jaffer and Oli= vier Nicole, review by Gabriel Scherer,
   David Allsopp, Tim = McGilchrist and Thomas Leonard)

- #13066, update OCAMLRUNPARAM docum= entation for the stack size parameter l
  (Florian Angeletti, revie= w by Nicol=C3=A1s Ojeda B=C3=A4r, Tim McGilchrist, and
   Miod= Vallat)

- #13078: update Format tutorial on structural boxes to men= tion alignment
  questions.
  (Edwin T=C3=B6r=C3=B6k, revie= w by Florian Angeletti)

- #13092: document the existence of the `[@@= poll error]` built-in attribute
  (Florian Angeletti, review by Gab= riel Scherer)

### Tools:

- #12340: testsuite: collect known i= ssues with current -short-paths
  implementation for existential ty= pes
  (Florian Angeletti, Samuel Hym, review by Florian Angeletti a= nd Thomas Refis)

- #12147: ocamllex: Allow carriage returns at the e= nd of line directives.
  (SeungCheol Jung, review by Nicol=C3=A1s O= jeda B=C3=A4r)

- #12260: Fix invalid_argument on some external or mo= dule aliases in ocamlnat
  (Fabian Hemmer, review by Vincent Laviro= n)

- #12185: New script language for ocamltest.
  (Damien Do= ligez with Florian Angeletti, S=C3=A9bastien Hinderer, Gabriel Scherer,
=    review by S=C3=A9bastien Hinderer and Gabriel Scherer)

= - #12371: ocamltest: fix recursive expansion of variables.
  (Anton= in D=C3=A9cimo, Damien Doligez, review by S=C3=A9bastien Hinderer,
 = ;  Damien Doligez, Gabriel Scherer, and Xavier Leroy)

* #12497,= #12613: Make ocamlc/ocamlopt fail with an error when no
  input fi= les are specified to build an executable.
  (Antonin D=C3=A9cimo, r= eview by S=C3=A9bastien Hinderer)

- #12576: ocamldep: various refact= ors.
  (Antonin D=C3=A9cimo, review by Florian Angeletti, Gabriel S= cherer, and L=C3=A9o Andr=C3=A8s)

- #12615: ocamldoc: get rid of the= odoc_literate and odoc_todo generators.
  (S=C3=A9baistien Hindere= r, review by Gabriel Scherer and Florian Angeletti)

- #12624: Use $X= DG_CONFIG_DIRS in addition to $XDG_CONFIG_HOME when searching
  for= init.ml and use this to extend init.ml support to the toplevel when
&nb= sp; running on Windows.
  (David Allsopp, report by Jonah Beckford,= review by Nicol=C3=A1s Ojeda B=C3=A4r and
   Antonin D=C3=A9c= imo)

- #12688: Setting the env variable `NO_COLOR` with an empty val= ue no longer
  has effects. Previously, setting `NO_COLOR` with any= value, including
  the empty value, would disable colors (unless `= OCAML_COLOR` is also set).
  After this change, the user must set `= NO_COLOR` with an non-empty value
  to disable colors. This reflect= s a specification clarification/change
  from the upstream website = at https://no-color.org.
  (Favonia, review by Gabriel Scherer)
=
- #12744: ocamltest: run tests in recursive subdirs more eagerly
&nb= sp; (Nick Roberts, review by Nicol=C3=A1s Ojeda B=C3=A4r)

- #12901, = 12908: ocamllex: add overflow checks to prevent generating incorrect
&nb= sp; lexers; use unsigned numbers in the table encoding when possible.
&n= bsp; (Vincent Laviron, report by Edwin T=C3=B6r=C3=B6k, review by Xavier Le= roy)

### Internal/compiler-libs changes:

- #12508 : Add compi= ler-side support for project-wide occurrences in Merlin, by
  gener= ating index tables of all identifier occurrences. This extra data in .cmt  files is only added when the new flag -bin-annot-occurrences is pa= ssed.
  (Ulysse G=C3=A9rard, Nathana=C3=ABlle Courant, suggestions = by Gabriel Scherer and Thomas
  Refis, review by Florian Angeletti,= Gabriel Scherer and Thomas Refis)

- #12236, #12386, #12391, #12496,= #12673: Use syntax as sole determiner of arity
  This changes func= tion arity to be based solely on the source program's
  parsetree. = Previously, the heuristic for arity had more subtle heuristics
  th= at involved type information about patterns.  Function arity is import= ant
  because it determines when a pattern match's effects run and = is an input
  into the fast path for function application.

&= nbsp; This change affects tooling: it changes the function constructs in pa= rsetree
  and typedtree.

  See https://github.com/ocaml= /RFCs/pull/32 for the original RFC.

  (Nick Roberts; review by = Richard Eisenberg, Leo White, and Gabriel Scherer;
  RFC by Stephen= Dolan)


- #12639: parsing: Attach a location to the RHS of Ptyp_= alias
  and improve the 'alias type mismatch' error message.
&nb= sp; (Jules Aguillon, review by Florian Angeletti)

- #12447: Remove 3= 2-bit targets from X86_proc.system
  (Masanori Ogino, review by Dav= id Allsopp)

- #12216, #12248: Prevent reordering of atomic loads dur= ing instruction
  scheduling.  This is for reference, as instr= uction scheduling is currently
  unused in OCaml 5.
  (Xavi= er Leroy, report by Luc Maranget and KC Sivaramakrishnan,
   r= eview by Nicol=C3=A1s Ojeda B=C3=A4r)

- #12025: Split Typecore.unify= _pat_types into two
  to avoid unnecessary references to the enviro= nment in type_pat
  (Jacques Garrigue and Takafumi Saikawa, review = by Gabriel Scherer)

- #12031: Use dedicated types to represent names= of compilation units
  and predefined exceptions in CMO files.
=   (S=C3=A9bastien Hinderer, review by Florian Angeletti, Thomas Refis,=
  Gabriel Scherer, Vincent Laviron, Pierre Chambart, Luke Maurer,<= br>  Hugo Heuzard, Xavier Leroy and Damien Doligez)

- #12109: P= ack parameters to unification in unification_environment
  (Takafum= i Saikawa and Jacques Garrigue, review by Richard Eisenberg)

- #1233= 1, #12361: Pack the unification data for pattern checking in Typecore
&n= bsp; (Takafumi Saikawa and Jacques Garrigue,
   review by Gabr= iel Scherer, Thomas Refis and Florian Angeletti)

- #12229: Remove gl= obal mutable state for typechecking patterns
  in Typecore in favor= of local mutable state.
  (Nick Roberts, review by Takafumi Saikaw= a)

- #12542: Minor bugfix to #12236: restore dropped call to `instan= ce`
  (Nick Roberts, review by Jacques Garrigue)

- #12242: M= ove the computation of stack frame parameters to a separate
  `Stac= kframe` module, and save the parameters in the results of the
  `Li= nearize` pass
  (Xavier Leroy, review by KC Sivaramakrishnan and Ma= rk Shinwell)

- #12442: document jump summaries in the pattern-matchi= ng compiler
  (Gabriel Scherer and Thomas Refis, review by Florian = Angeletti
   and Vincent Laviron)

- #12446, #12792: rem= ove the hooks machinery around channel locking
  in runtime/io.c  (Gabriel Scherer, review by Xavier Leroy)

- #12389, #12544, = #12984, #12987: centralize the handling of metadata for
  compilati= on units and artifacts in preparation for better unicode support for
&nb= sp; OCaml source files.
  (Florian Angeletti, review by Vincent Lav= iron and Gabriel Scherer)

- #12532, #12553: improve readability of t= he pattern-matching debug output
  (Gabriel Scherer, review by Thom= as Refis)

- #12537: Use C11/C++11 standard static assertion.
&nbs= p; (Antonin D=C3=A9cimo, review by Sebastien Hinderer, Xavier Leroy,
&nb= sp;  and KC Sivaramakrishnan)

- #12169: runtime: document and e= nforce naming conventions around STW sections.
  (Gabriel Scherer, = review by Enguerrand Decorne, Miod Vallat, B. Szilvasy
   and = Nick Barnes, report by KC Sivaramakrishnan)

- #12669 : Clean up some= global state handling in schedgen
  (Stefan Muenzel, review by Mio= d Vallat and Gabriel Scherer)

- #12640: Make the module separator us= ed in symbol names configurable
  (Miod Vallat, review by Hugo Heuz= ard and Xavier Leroy)

- #12691 : Clean up Ctype.expand_abbrev_gen an= d
  rename Env.add_local_type to add_local_constraint
  (Ta= kafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)

- = #12786 : Clean up the algorithm of Ctype.limited_generalize
  (Taka= fumi Saikawa and Jacques Garrigue, review by Gabriel Scherer)

- #106= 91: Ast_mapper, Ast_iterator: add functions directive_argument,
  t= oplevel_directive and toplevel_phrase.
  (Guillaume Petiot, review = by Gabriel Scherer and Kate Deplaix)

- #12764: Move all installable = headers in `caml/` sub-directories.
  (Antonin D=C3=A9cimo, review = by Gabriel Scherer and David Allsopp)

- #12914: Slightly change the = s390x assembly dialect in order to build with
  Clang's integrated = assembler.
  (Miod Vallat, review by Gabriel Scherer)

- #130= 01: do not read_back entire shapes to get aliases' uids when building the  usages index
  (Ulysse G=C3=A9rard, review by Gabriel Sche= rer and Nathana=C3=ABlle Courant)

### Build system:

- #12198,= #12321, #12586, #12616, #12706, #13048: continue the merge of the
 = ; sub-makefiles into the root Makefile started with #11243, #11248,
&nbs= p; #11268, #11420 and #11675.
  (S=C3=A9bastien Hinderer, review by= David Allsopp and Florian Angeletti)

- #12569, #12570: remove 'othe= rlibraries' as a prerequisite for 'runtop';
  use 'runtop-with-othe= rlibs' to use a library from otherlibs/
  (Gabriel Scherer, review = by S=C3=A9bastien Hinderer, suggestion by David Allsopp)

- #12652: M= ake magic numbers easier to bump and duplicate.
  (S=C3=A9bastien H= inderer, review by Antonin D=C3=A9cimo, David Allsopp and Florian
 = Angeletti)

* #12751: --with-target-bindir configure option implemen= ted. This option
  refers to the location of the runtime binaries o= n the target system for a
  cross-compiler and is embedded in execu= tables produced by ocamlc. It does
  not affect the bytecode execut= ables installed as part of the build. The old
  mechanism `make TAR= GET_BINDIR=3D..` no longer works.
  (David Allsopp, review by Damie= n Doligez, Xavier Leroy and Olivier Nicole)

- #12768, #13030: Detect= mingw-w64 coupling with GCC or LLVM, detect clang-cl,
  and fix C = compiler feature detection on macOS.
  (Antonin D=C3=A9cimo, review= by Miod Vallat and S=C3=A9bastien Hinderer)

### Bug fixes:

-= #10652, #12720: fix evaluation order in presence of optional arguments
=   (Jacques Garrigue, report by Leo White, review by Vincent Laviron)
- #12595, #12597: fix a race in `caml_clear_gc_stats_sample`
 = ; (Gabriel Scherer, review by B. Szilvasy, report by B. Szilvasy)

- = #12580: Fix location of alias pattern variables.
  (Chris Casinghin= o, review Gabriel Scherer, report by Milo Davis)

- #12583: Add a clo= sing event for when `EV_MAJOR_EPHE_MARK` is complete
  (Sudha Parim= ala, review by Gabriel Scherer)

- #12566: caml_output_value_to_mallo= c wrongly uses `caml_stat_alloc`
  instead of `malloc` since 4.06, = breaking (in pooled mode) user code
  that uses `free` on the resul= t. Symmetrically,
  caml_input_value_from_malloc should use `free`.=
  (Gabriel Scherer, review by Xavier Leroy and Enguerrand Decorne,=
   report by Ido Yariv)

- #12490: Unix: protect the po= pen_processes hashtable with a mutex
  (Gabriel Scherer, report by = Olivier Nicole, review by Xavier Leroy)

- #11931: Fix tricky typing = bug with type substitutions
  (Stephen Dolan, review by Leo White a= nd Jacques Garrigue)

- #12037, #12171: Fix get_extern_state potentia= l NULL dereference.
  (Alexander Skvortsov, report by T=C3=B6r=C3= =B6k Edwin,
   design by Gabriel Scherer, Xavier Leroy)
- #12635: Fix get_intern_state potential NULL dereference.
  (Anto= nin D=C3=A9cimo, review by KC Sivaramakrishnan)

- #12032, #12059: Bu= g fixes related to compilation of recursive definitions
  (Vincent = Laviron, report by Victoire Noizet, review by Gabriel Scherer)

* #12= 145: Loopy constraints cause ocamlc to loop.
  Fixed by completely = removing the call to `update_type` in
  `Typedecl.transl_type_decl`= , as the expansion is already checked by
  `check_regularity`. As a= result, recursion is more polymorphic,
  which may cause some (ess= entially wrong) type declarations to have
  unbound type variables,= and some constraints unrelated to the concrete
  type to be ignore= d (see tests/typing-misc/constraints.ml).
  (Jacques Garrigue, repo= rt by Richard Eisenberg, review by Leo White)

- #12207, #12222: Make= closure computation linear in the number of recursive
  functions = instead of quadratic
  (Vincent Laviron, report by Fran=C3=A7ois Po= ttier, review by Nathana=C3=ABlle Courant
  and Gabriel Scherer)
- #11040, #12591: fix a data race in major_gc.c
  (Gabriel Sch= erer, review by Guillaume Munch-Maccagnoni
   and KC Sivaramak= rishnan, report by Sadiq Jaffer)

- #12238, #12403, #12698: read inpu= t files in one go to avoid source reprinting
  issues.
  (G= abriel Scherer, report by Mike Spivey and Vincent Laviron, review by
&nb= sp;  Nicol=C3=A1s Ojeda B=C3=A4r, Xavier Leroy and Jeremy Yallop)
<= br>- #12334, #12368: Bad error message with mutually recursive abbreviation= s
  (Jacques Garrigue, report by Richard Eisenberg, review by Gabri= el Scherer
   and Richard Eisenberg)

- #12401: `seek_in= ` and `seek_out` sometimes returned normally when given
  negative = offsets, instead of failing. Now both functions should consistently
&nbs= p; raise `Sys_error` in this case.
  (Nicol=C3=A1s Ojeda B=C3=A4r, = review by Gabriel Scherer)

- #12267: Fix stack alignment computation=
  (Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer= )

- #12395, #12404: Fix thread-unsafety in the fallback implementati= on of
  `Unix.create_process` (the one used when `posix_spawnp` is = unavailable)
  (Xavier Leroy, report by Chris Vine, review by Nicol= =C3=A1s Ojeda B=C3=A4r)

- #12949: open shadowing mistriggers
&nbs= p; (Gabriel Scherer, review by Florian Angeletti, report by Andreas Rossber= g)

- #12526: Honor `ocaml.inline always` attribute on functions with=
  optional arguments and default values in the Closure backend
=   (Alain Frisch, review by Vincent Laviron)

- #12677, #12889: m= ake Domain.DLS thread-safe
  (Gabriel Scherer, review by Olivier Ni= cole and Damien Doligez,
   report by Vesa Karvonen)

- = #12561: Fix crash when combining TSan and frame-pointers
  (Fabrice= Buoro and Olivier Nicole, report by Jan Midtgaard, review by Miod
 = ; Vallat and Gabriel Scherer)

- #12482: Rework bounds checking code = in the POWER backend
  (Miod Vallat and Xavier Leroy, report by Jan= Midtgaard, review by
   KC Sivaramakrishnan)

- #12528,= #12703: Avoid pointer arithmetic overflow in Tag_val macro
  (very= likely harmless, but can trigger alarms)
  (Xavier Leroy, report b= y Sam Goldman, review by Guillaume Munch-Maccagnoni)

- #12593: TSan = should handle Effect.Unhandled correctly
  (Fabrice Buoro and Olivi= er Nicole, report by Jan Midtgaard and Miod Vallat,
   review = by Gabriel Scherer)

- #12684: fix locations filename in AST produced= by the `-pp` option
  (Gabriel Scherer, review by Florian Angelett= i)

- #12714: check whether macros are defined before using them to e= nsure
  that the headers can always be used in code which turns on = -Wundef
  (or equivalent).
  (Antonin D=C3=A9cimo, review b= y Miod Vallat, Gabriel Scherer,
   Xavier Leroy, and David All= sopp)

- #12726: fix segmentation fault under Windows when executing = a bytecode file if
  the runtime (`ocamlrun.exe`) cannot be found.<= br>  (Vadim Zborovskii, Nicol=C3=A1s Ojeda B=C3=A4r, report by Vadim Z= borovskii, review by
  David Allsopp)

- #12727, #12730: fix = bug with value let-rec and labelled applications
  (Vincent Laviron= , review by Gabriel Scherer)

* #12751: Always keep within the 128 ch= aracter limit for shebang lines. Previous
  fix in #8622 handled bu= ilding the compiler with a long prefix; this patch
  extends this t= o the bytecode executables emitted by that compiler.
  (David Allso= pp, review by Damien Doligez, Xavier Leroy and Olivier Nicole)

- #12= 755: Fix data race on global pools arrays of pool_freelist
  (Fabri= ce Buoro and Olivier Nicole, review by Gabriel Scherer)

- #12796, #1= 2801: Fix memory corruption in caml_unix_alloc_sockaddr
  (Thomas L= eonard, review by Nicol=C3=A1s Ojeda B=C3=A4r)

- #12737: Fix data ra= ces in minor_gc.c and caml_natdynlink_open
  (Olivier Nicole, revie= w by Stefan Muenzel, Miod Vallat, Guillaume
   Munch-Maccagnon= i, Gabriel Scherer and Xavier Leroy)

- #12831: Fix call to caml_call= _realloc_stack for s390x in PIC mode
  (Vincent Laviron, report by = Jerry James, review by Miod Vallat)

* #12837: Show non-generalizable= type parameters in type definitions
  Changes type of type paramet= ers in outcometree.mli.
  (Jacques Garrigue, review by Richard Eise= nberg)

- #12897: fix locking bugs in Runtime_events
  (Gabri= el Scherer and Thomas Leonard,
   review by Olivier Nicole, Vi= ncent Laviron and Damien Doligez,
   report by Thomas Leonard)=

- #12851: Fix race between runtime events teardown and event emissi= on
  (Olivier Nicole, review by Miod Vallat and Gabriel Scherer)
- #12860: Fix an assertion that wasn't taking into account the possibi= lity of an
  ephemeron pointing at static data.
  (Mark Shi= nwell, review by Gabriel Scherer and KC Sivaramakrishnan)

- #12861: = Fix a possible crash in the `threads` library.
  (Mark Shinwell, re= view by Gabriel Scherer and KC Sivaramakrishnan)

- #11040, #12894: S= ilence false data race observed between caml_shared_try_alloc
  and= oldify. Introduces macros to call tsan annotations which help annotate
=   a ``happens before'' relationship.
  (Hari Hara Naveen S and= Olivier Nicole,
   review by Gabriel Scherer and Miod Vallat)=

- #12958: Fix tail-modulo-cons compilation of try-with, && = and ||
  expressions.
  (Gabriel Scherer and Nicol=C3=A1s O= jeda B=C3=A4r, report by Sylvain Boilard, review by
  Gabriel Scher= er)

- #12919: Fix register corruption in caml_callback2_asm on s390x= .
  (Miod Vallat, review by Gabriel Scherer)

- #12924, #1293= 0: Rework package constraint checking to improve interaction with
 = immediacy
  (Chris Casinghino and Florian Angeletti, review by Flo= rian Angeletti and
   Richard Eisenberg)

- #12969: Fix = a data race in caml_darken_cont
  (Fabrice Buoro and Olivier Nicole= , review by Gabriel Scherer and Miod Vallat)

- #12971, #12974: fix a= n uncaught Ctype.Escape exception on some
  invalid programs formin= g recursive types.
  (Gabriel Scherer, review by Florian Angeletti,= report by Neven Villani)

- #13019: Remove linking instructions for = the Unix library from threads.cma
  (this was done for threads.cmxa= in OCaml 3.11). Eliminates warnings from
  new lld when using thre= ads.cma of duplicated libraries.
  (David Allsopp, review by Nicol= =C3=A1s Ojeda B=C3=A4r)

- #13058: Add TSan instrumentation to caml_c= all_gc(), since it may raise
  exceptions.
  (Fabrice Buoro= , Olivier Nicole, Gabriel Scherer and Miod Vallat)

- #13079: Save an= d restore frame pointer across Iextcall on ARM64
  (Tim McGilchrist= , review by KC Sivaramakrishnan and Miod Vallat)

- #13094: Fix undef= ined behavior of left-shifting a negative number.
  (Antonin D=C3= =A9cimo, review by Miod Vallat and Nicol=C3=A1s Ojeda B=C3=A4r)

- #1= 3130: minor fixes to pprintast for raw identifiers and local module open  syntax for types.
  (Chet Murthy, review by Gabriel Scherer= )

--=_78db1b8c-e0a0-4bea-98e2-9be53ec9c931--