Repository activity
40458 results across all weeks
An instance of a local `let poly_` function leaves its region: segmentation fault
With -extension layout_poly_alpha, an instance of a local let poly_ function that captures a stack block is a closure allocated on the local stack, but the type checker gives it the mode of the function. Here instance () returns pick out of its region, a later stack allocation overwrites it, and the call through it ends with a segmentation fault.
Mark Shinwell (@mshinwell)Array.make_matrix 0 max_int returns where Invalid_argument is documented
Array.make_matrix 0 max_int 0 returns an empty matrix, where the documentation says Invalid_argument for a dimension greater than Sys.max_array_length. Array.init_matrix 0 max_int and Bytes.extend b min_int max_int also return where Invalid_argument is documented.
Mark Shinwell (@mshinwell)Assertion failure in typecore.ml on a binding operator declared with external
external ( let& ) : 'a -> ('a -> 'b) -> 'b = "%revapply" and then let& y = x + 1 in y * 2 stop the compiler with an assertion failure. OCaml 5.4.0 compiles it.
Mark Shinwell (@mshinwell)Backend to extract parametric laws
For a file with law_? laws inside, this PR adds support for extracting the laws into a custom data type in a separate file.
Simon Spies (@spiessimon)Backport Merlin's new selection range (2121, plus 2029, 2107, 2120)
This PR backports the rewritten selection range feature: https://github.com/ocaml/merlin/pull/2121. In order to do so, other PRs it depends on had to be backported too.
Paul-Elliot Anglès d'Auriac (@panglesd)Backtrace lacks the caller of a function that never returns
The backtrace of an exception raised in a function that never returns lacks the frame of its caller when the call is not in tail position: Called from Test.check is missing. Bytecode and -Oclassic have it.
Mark Shinwell (@mshinwell)Backtrace of a raise of the last raised exception continues the earlier one
A raise of the exception value that was raised last, here Exit, continues the backtrace of the earlier raise, which was handled: the backtrace starts at first and says Re-raised at Test.second. OCaml 5.4.0 starts it at second.
Mark Shinwell (@mshinwell)Better attributes for functions with arity > max_arity
As discussed. After trying various hacks in translcore.ml that all proved too complex even for the simple cases, this patch simply tries to detect functions over the expected arity when adding attributes and add them deeper instead.
Vincent Laviron (@lthls)Bigarray.reshape raises Out_of_memory when the product of the dimensions wraps
Bigarray.reshape to dimensions whose product wraps raises Out_of_memory in place of the documented Invalid_argument. Here 5 x 3689348814741910324 is 4 modulo 2^64, the size of the array.
Mark Shinwell (@mshinwell)Branchless or_null tests: umin rewrite and tagged-comparison look-through in To_cmm
A branchless test of two or_null values, written with %is_null, a caml_csel_value builtin (select) and Bool.logor:
Mark Shinwell (@mshinwell)Build ocamlcmt + fix pprintast
This is mainly a fix for Pprintast.
Guillaume Bury (@Gbury)Bump magic numbers for 5.4.0-ox17
xclerc
Zack Eisbach (@zackbach)Byte swaps are not folded into a comparison with a constant or through `lxor`
Two folds that remove a byte swap:
Thomas Gazagnaire (@samoht)Bytecode and native code evaluate the object of a method call at different times
In (make ())#pack (say "a" 1) (say "b" 2) bytecode evaluates the object after the arguments, native code before them. The order is unspecified; the two differ.
Mark Shinwell (@mshinwell)Check CFG register equations at the explicit entry
After https://github.com/oxcaml/oxcaml/pull/7836, we know a CFG can
Xavier Clerc (@xclerc)Checked 256-bit stores write the low half before raising
set256 with a partially out-of-bounds index raises and leaves the low 16 bytes written:
KC Sivaramakrishnan (@kayceesrk)Cmm int casts
Add Tagged_int_of_int64, Int64_of_tagged_int, and Int_conv constructors to Cmm.static_cast. Int_conv represents conversions between naked integers, and Int64_of_tagged_int and Int_conv take a signedness.
James Rayman (@jra4)Cohorts for deduplicating layout-polymorphic instances at link time
Introduces the high-level concept of a cohort: a collection of
Luke Maurer (@lukemaurer)Cohorts for deduplicating layout-polymorphic instances at link time
Introduces the high-level concept of a cohort: a collection of
Luke Maurer (@lukemaurer)Compiler stops with Stack overflow in the join of types at -O3
At -O3 the compiler stops with Fatal error: exception Stack overflow on a function that joins closures of two instances of a recursive set. The join of types recurses without end when one side is an alias and the other is not.
Mark Shinwell (@mshinwell)