Commit Graph

27 Commits (718ace537e8dd5f8ecadb862e0ca19b73a08080a)

Author SHA1 Message Date
Konstantin Romanov d11a60bc22 Add attribute(align()) detection and fix XLC build. 2019-11-25 20:39:52 +01:00
Jacques-Henri Jourdan 5a53560e7d Fix address sanitizer check on INRIA CI (#9053)
Since the new stack overflow detection system (#8670), ASAN was confused.
We fix the issue by telling ASAN to not use a sigaltstack, and by disabling
ASAN on functions used by the stack overflow handler.
2019-10-19 11:39:30 +02:00
Damien Doligez 01bdd5bbc4
best-fit allocator (#8809) 2019-10-15 13:52:16 +02:00
David Allsopp 36b7a70713 Deprecate the addr typedef (#8896)
The typedef was guarded by CAML_INTERNALS, but given its accidental use
in the public Is_young macro, mark the typedef as deprecated in case
CAML_INTERNALS is being defined "in the wild" to workaround this.
2019-10-14 19:34:07 +02:00
Guillaume Munch-Maccagnoni b304042b29 Fix missing Caml_state (#8940)
* Fix free identifiers in spacetime

* Fix free identifiers in tools/gdb-macros

* [minor] Fix Caml_state fields in comments, and other comment updates

* Changes
2019-10-03 16:27:32 +02:00
David Allsopp 7f96c82fda Windows Unicode handling for ocamlyacc
This deals with the command line processing only (i.e. filenames) -
ocamlyacc continues to process .mly files as before.
2019-04-16 17:37:17 +01:00
David Allsopp a7b5bb6f06 Propagate Caml_state_field 2019-08-24 12:15:49 +02:00
KC Sivaramakrishnan e96220a96f Simplify awk scripts, fix comments and signatures. 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan b22240f53c Fix CAML_STATIC_ASSERT for MSVC 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan 1aec112619 Define alignment macro for MSVC compiler 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan c06038a0ee Move backtrace support global variables to domain state.
Since we cannot access backtrace position in cmmgen.ml anymore,
Cmm.raise_kind in removed. Instead, we use Lambda.raise_kind. When
assembly code is generated, we reset the backtrace position to 0 in the
case of regular raise. Importantly, the semantics remains the same.
2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan 755f5444f1 Move all statistics variables to domain state 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan b212aed0cb Make depend and fix typos 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan fc6f028492 Introduce domain state and steal exception pointer 2019-08-23 09:50:05 +05:30
Xavier Leroy 7ffa7d26c8 misc.h: include <stdarg.h> so that va_list is defined
Follow-up to PR#8630, commit cddec18fd.
2019-07-31 11:36:21 +02:00
Xavier Leroy 9d84841c46
Merge branch 'trunk' into fatal_error_abort 2019-07-31 11:18:57 +02:00
Jacques-Henri Jourdan 78de99ecc2 Xavier Clerc's remarks. 2019-07-16 13:42:04 +02:00
Jacques-Henri Jourdan 593f94055a Dynlink support for ocamldebug
This commit adds dynlink support for ocamldebug. As a side effect, it also:
  - factorizes the various functions searching for a code fragment into one,
    called [caml_find_code_fragment];
  - removes the [caml_register_code_fragment], which does not seem to
    be used anywhere, and which clearly should not be used by external code.
2019-07-16 10:52:48 +02:00
Jacques-Henri Jourdan a121072588
Merge branch 'trunk' into fatal_error_abort 2019-07-15 10:16:29 +02:00
Jacques-Henri Jourdan 1ea07c881b Fix Thread sanitizer after GPR#8691.
GPR#8691 refactored the signal/async callback system, and introduced
new data races to `caml_something_to_do` and friends. These data races
morally already existed and are "benign", in the sense that they can
only cause more checks for async callbacks.

The corresponding functions are now marked with a special attribute
for whitelisting them. We do no longer use -fsanitize-blacklist, which
seemed to fail preventing warnings (???).
2019-06-18 13:32:46 +02:00
Jacques-Henri Jourdan cddec18fde Add [caml_fatal_error_hook].
When not NULL, this hook is called when a fatal error is encountered
instead of printing an error message on stderr.
2019-06-08 23:05:16 +02:00
Jacques-Henri Jourdan 63a16e8e67 Major GC hooks are no longer allowed to interact with the GC heap. (#8711)
Earlier documentation comments suggested that major GC hooks can do things with the GC-managed heap.  This is problematic and not used in practice.

This commit changes the documentation comments to make it clear that major GC hools are not allowed to interact with the GC-managed heap.
2019-06-04 19:58:20 +02:00
Jacques-Henri Jourdan b838e48c39 Memprof: Instead of a Poisson process, use a binomial distribution.
The workaround used for ignoring samples in the minor heap in native
mode now makes allocation very slow (or non-terminating) when the
sampling rate is not small enough. This will be fixed when sampling in
the minor heap in native mode will be implemented.
2019-05-21 17:10:16 +02:00
Nicolás Ojeda Bär 8afe2db3c6 Runtime: hide & rename _T macro (#2075)
- Rename _T macro to T to avoid conflict with
- Do not use it for ASCII character literals
- Guard T macro with CAML_INTERNALS
2019-04-14 09:13:24 +02:00
Damien Doligez b6cf38d9d6
MPR#7814: fix non-prefixed symbol names in debug and instrumented runtimes (#1900)
* make `names_of_instructions` a static variable
* use lowercase names for CAML_INSTR functions, variables, and structs
* add changelog entry
2018-07-13 16:06:36 +02:00
Xavier Leroy 7e79186a12
Remove the C plugins mechanism (#1867)
The mechanism complicates the runtime system and is not very general
(only a few system functions are instrumented).  There are other ways
to intercept system calls that are more general and require no
modification to the source code of the runtime system.
2018-07-03 18:22:51 +01:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00