| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Just treat atomic loads like stores.
Fixes: #12216
|
|
|
|
|
|
|
|
| |
Also time counter a uint64_t instead of casting between
signed/unsigned longs on all the platforms. The type
of most of the monotonic counter interfaces is an uint64,
except for Windows.
Fixes #12096
|
| |
|
|
|
| |
Also sync the list of dependencies with gen_primitives.
|
|\
| |
| | |
Simplify weak hash sets
|
| |\
| |/
|/| |
|
|\ \
| | |
| | | |
Fix typo in privatetypes.etex
|
|/ /
| |
| | |
This commit fixes a trivial typo in the manual pages about private types.
|
| | |
|
| | |
|
| | |
|
| |\
| |/
|/| |
|
|\ \
| | |
| | | |
Improve legibility of dynamic linking error messages
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid wrapping a Dynlink `Cannot_open_dynamic_library` error into
another `Cannot_open_dynamic_library` error:
- rewrite the platform-specific (bytecode and native) `load`
implementations to ensure they raise only `DT.Error` exceptions, by
always catching other exceptions and wrapping them into
`Cannot_open_dynamic_library` errors,
- remove the systematic wrapping of exceptions in `Dynlink_common`.
Adopt `%s` rather than `%S` to display the inner exceptions in the
exception printer for `DT.Error (Cannot_open_dynamic_library _)` to
avoid double escaping
In particular, trying to link a non-existent file in the native
implementation gives the hard-to-parse message:
Fatal error: exception Dynlink.Error (Dynlink.Cannot_open_dll "Dynlink.Error (Dynlink.Cannot_open_dll \"Failure(\\\"...: cannot open shared object file: No such file or directory\\\")\")")
This patch turns this message into:
Fatal error: exception Dynlink.Error (Dynlink.Cannot_open_dll Failure("...: cannot open shared object file: No such file or directory"))
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Same functionality as `caml_ext_table_add`, but returns -1 when running
out of memory instead of raising an exception.
Use the new function in `caml_read_directory`, which must not raise exceptions
since it is called from blocking sections. Instead, `caml_read_directory`
returns an error code if `caml_ext_table_add_noexc` runs out of memory.
Also: harden `caml_ext_table_add{,_noexc}` against integer overflow
when computing the new table size for resizing.
Fixes: #10403
|
| | |
|
|\ \
| | |
| | | |
Simplification with atomic_ helpers
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
remove unused error constructor: Unbound_row_variable
|
| | | | |
|
|/ / /
| | |
| | |
| | | |
New test script language, all tests translated automatically (see `tools/translate-all-tests`).
|
| | |
| | |
| | |
| | |
| | | |
I needed it this morning and failed to find it without going back to
the PR.
|
|\ \ \
| | | |
| | | | |
Simplify and fix the shadow store reservation on Win64
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The Win64 ABI requires the caller to reserve a fixed 32 bytes of stack
space prior to the call for the function to spill the four argument
registers into (if it chooses).
There are three ways C functions are called by OCaml programs. Under
Windows, two of them were needlessly wasting space reserving this twice
and the third was not reserving it at all.
This implementation capitalises on the fact that OCaml 5 no longer uses
the C stack for OCaml code and so adds the shadow store to the
c_stack_link struct. When in OCaml code, the C stack is therefore left
in exactly the required state to call a C function, which removes the
need for the stack pointer computations from the backend.
Simultaneously, this also fixes a bug, as the shadow store previously
was not being reserved at all when calling noalloc C functions.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
rbx is normally preserved in the Win64 ABI (as for Unix), but OCaml 5
uses it to save the OCaml stack pointer for direct (noalloc) calls. The
fact rbx is clobbered at C call was incorrectly missing in the Win64
register descriptions.
|
| | | |
| | | |
| | | | |
check that anything that starts with `(* TEST` is indeed a test script
|
| | | |
| | | |
| | | |
| | | | |
It can cause problem with user code that defines its own `bool` type.
Instead, use stdbool.h internally only, and only when really needed.
|
|\ \ \ \
| | | | |
| | | | | |
Fix warnings emitted when compiling the documentation
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Document the situation regarding `remove_global_root` inside custom finalizers
|
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Take host into account when looking for pkg-config
|
| | | | |
| | | | |
| | | | |
| | | | | |
Try ${host}-pkg-config before falling back to pkg-config
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
This is to prepare the next commit: when cross-compiling the right
pkg-config to use is the one giving information on the host system.
|
|\ \ \ \
| | | | |
| | | | | |
fix the configure check for pthread_getaffinity_np
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
AC_COMPILE_IFELSE only compiles, but the lack of the function results
in a linking error, not a compilation error.
fixes #12101
|
|/ / / /
| | | |
| | | |
| | | | |
Update gdb-macros and gdb_ocamlrun.py to work with OCaml 5.
|
|\ \ \ \
| | | | |
| | | | | |
extern.c: raise OOM instead of passing null in `caml_output_*` entrypoints
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Split out `extern_init_stack` into a separate function, so that the code for initializing and resetting the extern_state stack is not duplicated.
Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These should only be called from within a `caml_output_*` entrypoint context.
Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
|
|/ / / /
| | | |
| | | |
| | | | |
Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
|
|\ \ \ \
| | | | |
| | | | | |
major_gc.c: avoid using a PAGE_MASK macro
|
| | | | |
| | | | |
| | | | |
| | | | | |
Co-authored-by: Stefan Muenzel <source@s.muenzel.net>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Issue #12101 reports a build warning on android where a macro
PAGE_MASK is already defined by the system. We rename this macro into
CHUNK_MASK, along with some documentation of the representation of
the compressed mark stack.
|