Repository activity
40458 results across all weeks
Unix: keep tv_usec non-negative in caml_timeval_of_sec
Fixes #15381 (cc @kayceesrk)
Prakhand Patel (@Shivaay19)Use TARGET_BINDIR rather than HOST_BINDIR when linking fallback-search relocatable bytecode binaries
Since you asked me for a tale of relocatable bugs, I was sitting in my drawing room this weekend, enjoying a moment of leisure perusing the patches of Relocatable OCaml as I'm often wont to do at weekends, when I came across a suspicious hunk in bytecomp/bytelink.ml.
David Allsopp (@dra27)Use a strong type for Proxies in Out_type
When trying to understand how printing of types works when I looked at https://github.com/ocaml/ocaml/pull/14147, I ended up refactoring Out_type a little bit to gain a cleaner understanding.
Stefan Muenzel (@smuenzel)Use memprof status field to distinguish minimal sampling
Statmemprof can be used at very low (or zero) frequency lambda, logically sampling allocation but in fact never taking a sample. We avoid doing any work for this case (e.g. we don't initialise the PRNGs). With this PR we test for this case using a new status value CONFIG_STATUS_SAMPLING_MIN, instead of the distinguished value -Inf for 1/log(1-lambda) (saved …
Nick Barnes (@NickBarnes)Weak.set lost when the collector rewrites the slot
A value stored with Weak.set can be lost: the next Weak.get returns None although the value is still reachable. Only one domain uses the weak array; the slot is overwritten by the GC running on another domain.
KC Sivaramakrishnan (@kayceesrk)Work around the socketcall seccomp block in the i386 job
On ubuntu-26.04 runners, Docker 29.4.2's default seccomp profile denies socketcall(2), which i386 glibc uses for networking, so the debian:13 i386 container cannot resolve host names and apt-get update fails (actions/runner-images#14790). Run the container with seccomp unconfined. This also works on ubuntu-24.04, and can be dropped once the runner image ship…
Tim McGilchrist (@tmcgilchrist)[v2] configure: use Autoconf support for detecting the C++ compiler
Re-landing of #14996 after it was reverted in #15193.
Antonin Décimo (@MisterDA)`Event.sync` or `Event.poll` in a handler leaves Event locked
Calling Event.sync or Event.poll from a signal handler that runs on a thread already inside Event.sync can leave the process-global Event.masterlock held, after which every operation that executes an event hangs. The handler does not explicitly raise; its Event.poll raises the Sys_error that escapes. If the signal arrives on a thread that is inside Event.syn…
KC Sivaramakrishnan (@kayceesrk)add nul-terminated line input functions
nul-termination of lines is a common way for shell scripts to communicate (e.g., grep, git, and many others have -z option). it makes sense for programs to be able to input lines separated by nul bytes.
Raphaël Proust (@raphael-proust)caml_shutdown segmentation fault in caml_do_local_roots
After fixing https://github.com/ocaml/ocaml/issues/14298 (which turned out to be a bug in nbdkit), we've hit a different crash when calling caml_shutdown:
rwmjonesfloat_of_string misrounds subnormal hex doubles
float_of_string "0x50000000000001p-1127" returns the double with bits 2, where the exact result rounds to 3.
KC Sivaramakrishnan (@kayceesrk)getgrnam raises ENOMEM for group entries over 64 KiB
On 5.5.0 and trunk, Unix.getgrnam and Unix.getgrgid raise Unix_error(ENOMEM, ...) for a group with 3500 members. Since #13700 the getgrnam_r/getgrgid_r buffer is capped at 64 KiB (getgr.c:44-45). When the entry is larger, the ERANGE loop gives up and raises ENOMEM (getgr.c:61-70).
KC Sivaramakrishnan (@kayceesrk)getgrnam raises Unix_error for missing groups
Unix.getgrnam and Unix.getgrgid raise Unix_error(ENOENT, ...) for a group that does not exist. This happens on x86_64 Linux hosts whose NSS group source is compat systemd sss. unix.mli says getgrnam raises Not_found if no such entry exists (unix.mli:1428-1431, and the same for getgrgid). A program that catches Not_found now dies with an uncaught exception on…
KC Sivaramakrishnan (@kayceesrk)input_value runs pending actions holding the channel lock
A signal handler that runs while input_value is unmarshalling and raises leaves the input channel locked; the next operation on it aborts with Fatal error during lock_non_blocking: Resource deadlock avoided.
KC Sivaramakrishnan (@kayceesrk)manual: document how to use TSan inside a container
See https://github.com/google/sanitizers/issues/1716 and https://github.com/moby/moby/issues/43011.
Török Edwin (@edwintorok)ocaml-variants.opam: add use_sigaltstack=0
tools/ci/inria/sanitizers/script already uses this since: 5a53560e7d ("Fix address sanitizer check on INRIA CI (#9053)")
Török Edwin (@edwintorok)output_value is not atomic on a shared channel
Two writers calling output_value (Marshal.to_channel) on one channel can interleave their bytes, and the reader then fails. check_pending drops the channel lock around pending actions (io.c:120-133) so signal handlers do not run under it. One Marshal.to_channel reaches that point at every 64 KiB flush. The other writer can then append its header and data bet…
KC Sivaramakrishnan (@kayceesrk)refactorisation: a more structured type for the typechecker's error trace
This PR proposes to decouple the postprocessing of the typechecker error trace
Florian Angeletti (@Octachron)runtime: drop redundant memory-model fences around atomic RMWs on AArch64
caml_atomic_exchange/_cas/_fetch_add wrap a sequentially-consistent atomic
Sebastian Pop (@sebpop)stdlib: Add Map.inter and Map.diff
This adds intersection and diff on maps with a slight optimization over a merge based implementation which cannot be done using the module's public API, similar to what Map.union does.
Nathan Rebours (@NathanReb)