Commit Graph

20284 Commits (bdd9ca391e3a56253d7480b07bb1a8aac361904c)

Author SHA1 Message Date
Xavier Leroy 3a408ff3e8
Modernize signal handling on Linux i386, PowerPC64, and s390x (#9543)
OCaml's signal handlers need to know the state of the processor when the signal was received. The approach standardized by the Single Unix specification is to use 3-argument signal handing functions and the SA_SIGINFO flag to sigaction. However, as the Linux man page for sigaction says,

Undocumented:
Before the introduction of SA_SIGINFO, it was also possible to get some
additional information, namely by using a sa_handler with a second
argument of type struct sigcontext. See the relevant Linux kernel
sources for details. This use is obsolete now.

For historical reasons, the i386, PowerPC and s390x Linux ports of OCaml still use the undocumented, obsolete approach, while the other Linux ports use the modern SA_SIGINFO approach. 

For consistency and future-proofing, this PR updates the i386, PowerPC64, and s390x Linux ports to use the modern approach to signal handling.  PowerPC32 was left as before because of technical subtleties and lack of hardware to test changes.

The new code for PowerPC 64 bits includes the trick proposed in PR#1795 to support Musl in addition to Glibc on ppc64le.
2020-05-13 11:15:13 +02:00
Gabriel Scherer f81e2b6a59
testsuite: remove a slow exhaustiveness check (#9555)
The test takes 14s to run every time we run the checksuite, and it
does not seem to serve an easily identifiable purpose. In theory
similar tests could help detect a performance regression in
exhaustiveness checking, but this test seems to only degrade in
constant factor (#9152 proposed to use ocamlc.opt instead of ocamlc to
run it, but it was declined as "hiding" potential problems, which
suggests constant-factor differences). We do not monitor the testsuite
for 10s timing difference, so it is unlikely that we would notice
a constant-factor difference during automated testing.
2020-05-13 10:52:56 +02:00
Christophe Troestler c920ea142b
Fix comment about NaN propagation (#9536)
Fix documentation comment about NaN propagation

Closes: #7891

Co-authored-by: David Allsopp <david.allsopp@metastack.com>
2020-05-12 15:35:04 +02:00
Jacques-Henri Jourdan 629fae6dc4 Add test statmemprof/thread_exit_in_callback. 2020-05-11 17:10:13 +02:00
Jacques-Henri Jourdan aa64e70bc1 Changes 2020-05-11 15:56:13 +02:00
Jacques-Henri Jourdan 97eb98db94 Memprof: fatal error if thread is stopped from a callback.
This is specified as undefined behavior in gc.mli.

We now use dedicated functions for the interraction between Memprof
and systhreads.
2020-05-11 15:55:07 +02:00
Florian Angeletti c86a5d8d11
#9189: avoid one-letter make variables (#9281) 2020-05-11 12:21:59 +02:00
Xavier Leroy 37c5bd87a9 Run the "stale" script 3 times a week 2020-05-09 10:42:01 +02:00
Gabriel Scherer f7ec223df9 add a known-bug test for buggy 'rec' (non)use in the #show command 2020-05-09 08:43:23 +02:00
Xavier Leroy 4ac06a874a
Merge pull request #9522 from gasche/compare-infix-function
compare: correctly compare a Closure_tag with an Infix_tag
2020-05-07 14:42:41 +02:00
Gabriel Scherer fc35f8baa0 compare: move Forward/Infix tests outside the hot path 2020-05-06 22:29:01 +02:00
Gabriel Scherer 3a43b84e8a compare: correctly compare a Closure_tag with an Infix_tag 2020-05-06 22:29:01 +02:00
Gabriel Scherer 20e1d6e478 fix 'dune build @libs' after #9257 2020-05-06 21:37:08 +02:00
David Allsopp f5006025d6
Merge pull request #9527 from gasche/clean-without-deps
Clean without deps: reworking CAN_BE_UNCONFIGURED
2020-05-06 16:29:42 +01:00
Gabriel Scherer ffbea08d02 Changes entry 2020-05-06 12:10:02 +02:00
Gabriel Scherer fd789b5cec [minor] stdlib/Makefile: remove redundant clean action
There is already a more precise

    clean::
            rm -f $(CAMLHEADERS)

rule above.

(Change suggested by David Allsopp.)
2020-05-06 12:10:02 +02:00
Gabriel Scherer 67f6128ebd [minor] Makefile: move ARCH_SPECIFIC back to the main Makefile
(This is a small, independent readability fix.)

ARCH_SPECIFIC was moved into Makefile.compilerlibs by mistake; it is
not used in Makefile.compilerlibs (in particular the
ARCH_SPECIFIC_ASMCOMP_* variables do not depend on it), and it is used
in the main Makefile.
2020-05-06 12:10:02 +02:00
Gabriel Scherer 11c9d92732 ocamltest/Makefile: do not depend on UNIX_OR_WIN32 for 'clean'
Change suggested by David Allsopp.
2020-05-06 12:10:02 +02:00
Gabriel Scherer 3489e002c6 refactor Makefile.config_if_required for easier reuse of variables 2020-05-06 12:10:02 +02:00
Gabriel Scherer e34e62253f move the REQUIRES_CONFIGURATION logic in Makefile.config_if_required
This lets us share the logic between Makefile.common and Makefile.tools.
2020-05-06 12:10:02 +02:00
Gabriel Scherer 8d716a1712 Makefile: no need for REQUIRES_CONFIGURATION check on config.status
Now that Makefile.build_config is only included when configuration is
required, we can remove the REQUIRES_CONFIGURATION logic here.
2020-05-06 12:10:02 +02:00
Gabriel Scherer 21f5ad3b4a build system: skip Makefile.build_config when REQUIRES_CONFIGURATION is empty
Before we would include it if present, but support building without
it. Unless I misunderstand something, this is unnecessarily complex:

- If we want to support building without it, we may as well
  do without it all the time (in particular it makes it easier
  to spot bugs which occurs when it is missing).

- Certain makefile rules (see config.status) work by being added
  as dependencies to Makefile.build_config, and requiring this file
  only when actually needed makes it possible to simplify those.
  (simplifications not included in this commit)

I reviewed all 'clean' rules to check that they do not depend on
variables defined in the configure. On the other hand, the main
makefiles do a lot of conditional tests on those variables,
so --warn-undefined-variables warns quite a bit. (This could be solved
by a Makefile.no_config rule that mirrors Makefile.config with dummy
definitions.)
2020-05-06 12:10:02 +02:00
Gabriel Scherer 472a20d735 [minor] rename CAN_BE_UNCONFIGURED into REQUIRES_CONFIGURATION 2020-05-06 12:10:02 +02:00
Gabriel Scherer fab58a938a makefiles: move the inclusion of Makefile.build_config in Makefile.common 2020-05-06 12:10:02 +02:00
Xavier Leroy f2587c1fb1
Merge pull request #9529 from dra27/macos-gnu-make
Further C dependency fixes
2020-05-06 09:53:45 +02:00
Xavier Leroy 29d5f485d8 Jenkins CI job to test the Dune-based build 2020-05-05 19:21:42 +02:00
Xavier Leroy 9414e5af09
Add a "stale" Github action to process inactive issues (#9530)
As discussed among the core OCaml developers.

This commit adds a Github action that "pings" issues that have been inactive for one year and schedules them for closing 30 days later if no action has been taken.
2020-05-05 18:36:10 +02:00
octachron 273f2f8c7d Changes: move 9228 to 4.11.0 section 2020-05-05 15:12:42 +02:00
David Allsopp d4009ac4e3 Move 9437 to 4.10 2020-05-05 10:13:23 +01:00
David Allsopp 21654fcbf2 Move Changes entry for 9531 to 4.10 2020-05-04 14:28:48 +01:00
Hannes Mehnert 3f7e56c40d
configure: support bfd on FreeBSD (#9531)
On FreeBSD, libbfd is - similarly to OpenBSD - not installed by default, but
can be added via the devel/libbfd port. This will install libbfd into the
/usr/local prefix, thus configure needs to look there for include and library
2020-05-04 14:26:32 +01:00
Xavier Leroy 1c7d5f4ab4 check-typo attributes for .github directory
Expect no headers, long lines, and very long lines.
2020-05-04 15:25:45 +02:00
Florian Angeletti 24806a0223
Merge pull request #9228 from yallop/map-documentation
Fix some issues in the Map documentation
2020-05-04 09:49:53 +02:00
David Allsopp 312ec987b6 Update Changes 2020-05-03 17:07:17 +01:00
David Allsopp 942105f49e Remove unneeded $(otherfiles) in runtime/Makefile
No longer required, and in fact causing breakages now that -MG isn't used.
2020-05-03 16:07:07 +01:00
David Allsopp c948b8d051 Don't use -MG
It's a subtly broken thing to do, as discovered on the ARM workers on
Inria's CI.
2020-05-03 16:03:46 +01:00
David Allsopp 617522ec95 Restore compatibility with GNU make 3.81
It's the macOS default installed version still. The dependency generation
inadvertently relies on behaviour introduced in GNU make 3.82 a decade ago.

The fix in otherlibs/systhreads/Makefile also corrects missing
NATIVE_CPPFLAGS when generating st_stubs.n.d, so st_stubs.n.o now
correctly depends on caml/stacks.h instead of caml/stack.h
2020-05-03 16:00:28 +01:00
David Allsopp b3af8ca2a9 Tighten dependencies for C files
The $(wildcard *.h) should only be there with
--disable-dependency-generation, since otherwise gcc -MM will be
determining exactly which header files should be checked.
2020-05-03 15:27:14 +01:00
David Allsopp e3dffa8a7f Silence CI warning for undefined variable 2020-05-03 15:26:53 +01:00
Gabriel Scherer c14ba72dee HACKING.adoc: restructure the opam information and fix the cross-reference 2020-05-03 16:05:31 +02:00
David Allsopp 11d0d662ae Turn on dependency checking on Inria CI
Only the "old school build" test uses --disable-dependency-generation.
This is also tested on both Travis and AppVeyor, so we have good release
coverage checking of this option.
2020-05-03 12:29:23 +01:00
Gabriel Scherer 9eb9d04751 fix the dune build 2020-05-03 10:11:47 +02:00
Gabriel Scherer 239de4d870 INSTALL.adoc: replace Makefile.common.in with Makefile.build_config.in 2020-05-03 09:55:02 +02:00
David Allsopp 6c8d79d1bd
Merge pull request #9526 from jberdine/docs
Fix ephemeron documentation typos
2020-05-03 08:06:52 +01:00
Josh Berdine a282c170f9
Update stdlib/ephemeron.mli
Co-authored-by: David Allsopp <david.allsopp@metastack.com>
2020-05-03 00:25:54 +01:00
Josh Berdine 5e2b28decc Fix ephemeron documentation typos
Signed-off-by: Josh Berdine <josh@berdine.net>
2020-05-02 22:46:48 +01:00
KC Sivaramakrishnan 9355b4e8f5
Initialise in caml_obj_block / Obj.new_block only when necessary (#9513)
caml_alloc returns initialised blocks for tag < No_scan_tag. Otherwise,
initialise the blocks as necessary.

For Abtract_tag, Double_tag and Double_array_tag, the initial contents
are irrelevant.

Uninitialised Custom_tag objects are difficult to use correctly. Hence,
reject custom block allocations through Obj.new_block.

For String_tag, the last byte encodes the string length. Hence, reject
zero-length string objects. Initialise the last byte which encodes the
length to ensure non-negative lengths for uninitialised strings.
2020-05-02 18:47:16 +02:00
Gabriel Scherer 78e12a9255
Merge pull request #8753 from gasche/ci-test-depend
add a new Travis CI check that 'make alldepend' is a no-op
2020-05-02 11:16:55 +02:00
Gabriel Scherer 876af2567e
Merge pull request #9493 from trefis/rematch-matcher-unification
pattern-matching refactoring: merge the two matchers
2020-05-02 08:46:50 +02:00
Gabriel Scherer cdccc0b1cb add a new Travis CI check that 'make alldepend' is a no-op 2020-05-01 22:23:28 +01:00