Commit Graph

15541 Commits (970eebe4be0c3041aee54a4815612931aa4c55bc)

Author SHA1 Message Date
Xavier Leroy 970eebe4be MPR#7640: reimplementation of Unix.execvpe (#1414)
Use the system-provided execvpe() if possible.  Otherwise, use
a serious reimplementation written in OCaml and patterned after
the Glibc execvpe() implementation.

Added a test in tests/lib-unix/unix-execvpe.

Don't test Unix.execvpe if we are using the system-provided implementation.
The execvpe() functions provided by Win32 and Cygwin aren't quite to
our specs.  At any rate, the test is there to find bugs in our
implementation of execvpe(), not in others's.
2017-10-10 14:12:19 +02:00
Xavier Leroy 019f469aa3 MPR#7609: use-after-free with ocamldebug and Pervasives.flush_all, continued (GPR#1419)
This is a follow-up to commit 6d9ce26 and to GPR #1361.

I forgot that the win_{in,out}channel_of_filedescr functions from the
Win32 implementation of the Unix library call caml_open_descriptor_{in,out}
directly, without going through caml_ml_open_descriptor_{in,out} like
the Unix implementation of the Unix library does.

As a consequence the CHANNEL_FLAG_MANAGED_BY_GC flag is not set by
the Win32 implementation.

This commit fixes the Win32 implementation and brings it in sync with
the Unix implementation by setting the CHANNEL_FLAG_MANAGED_BY_GC
flag.
2017-10-09 19:20:46 +02:00
Xavier Leroy 875ff82841 MPR#7048: ocamldoc -latex, don't escape Latin-1 accented letters (GPR#1420)
This causes trouble when the doc comments are actually in UTF8 and
the user is providing their own preamble with an UTF8 inputenc.

The default preamble still contains \usepackage[latin1]{inputenc},
so the Latin-1 accents will still display fine.
2017-10-09 19:18:28 +02:00
Jeremy Yallop 776387b47c let-rec check: use Map, not Ident.tbl, for the "type" that tracks variable use.
The extra semantics of Ident aren't needed, and add significant extra cost.
2017-10-09 19:22:36 +02:00
Sébastien Hinderer 1fcba7ea7a ocamltest: simplify tests and actions a bit
Now that actions can occur directly in test blocks, it is no longer
necessary to wrap each action in a test. This commit thus removes
all the single-action tests.

It also renames a few actions to give them simpler names.
2017-10-09 17:09:53 +02:00
Sébastien Hinderer 0894e2b18a ocamltest: fix, simplify and clarify the test-tree traversal algorithm 2017-10-09 17:09:53 +02:00
Sébastien Hinderer 5c8b212349 ocamltest: minor code update 2017-10-09 17:09:53 +02:00
Sébastien Hinderer cee23d79a9 ocamltest: add actions to test whether tests are run on Unix or Windows 2017-10-09 17:09:53 +02:00
Sébastien Hinderer 6bf807936a ocamltest: add builtin actions to always pass, skip or fail.
These actions are useful e.g. to debug the tool itself.
2017-10-09 17:09:53 +02:00
Gabriel Scherer 8eef73ea8d Merge pull request #1384 from yawaramin/readme-ocaml-org
MPR#7647: emphasize ocaml.org links in readme
2017-10-08 17:59:56 +02:00
Yawar Amin 2f8fba579e MPR#7647: emphasize ocaml.org links in readme
Link to appropriate pages in ocaml.org for the homepage, getting OCaml,
documentation, and discussion fora.
2017-10-08 11:58:10 -04:00
Gabriel Scherer 6aae29d92d Merge pull request #1398 from nojb/do_not_use_%S
One more Windows Unicode PR: do not use %S
2017-10-08 17:23:01 +02:00
Xavier Leroy a3aa013181 tests/lib-threads: remove the 'signal2' test
This test shows bizarre behaviors on the BSDs, including MacOS: it looks like the INT signal is ignored when the test program is run from signal2.runner, but not when running it manually outside of the test script.  That could be a Caml problem, or a BSD pthread implementation problem, or a misunderstanding of signal handling in POSIX threads.

At any rate, the signal2 test as it was until recently is useless because it is designed to succeed even in the face of the BSD failure mentioned above (kill -9 to guarantee termination + grepping only for [ab]*, which always succeeds).  So, I'm just removing it.
2017-10-08 11:50:34 +02:00
Xavier Leroy b6bda6a76e tests/lib-threads: make signal tests more reliable
signal2.ml: normalize the signal numbers
signal.checker: accept some "ab" output after the "exiting" message
  (exiting is not instantaneous; the threads can still emit some a's and b's)
signal2.checker: do like signal.checker
2017-10-08 10:05:23 +02:00
Xavier Leroy 801993dc8d GPR#931 follow-up: problem with remove_DEBUG sed script under OpenBSD
On OpenBSD this script removes the newline at the end of each line
that is transformed.  If the next line is a `# lineno "filename"`
directive, a syntax error occurs.

This commit changes the script to use a sed 's' command instead of a
'c' command.  This restores the expected behavior under OpenBSD and
seems to make no difference for other systems.
2017-10-07 15:52:07 +02:00
Gabriel Scherer 21df1ec6c2 Merge pull request #1413 from gasche/travis-clean
travis: test 'make clean'
2017-10-07 13:32:16 +02:00
Gabriel Scherer ab0cb2fcce fix 'make clean' broken by testsuite/tests/afl-instrumentation
Should the "clean: defaultclean" default rule be part of
  testsuite/makefiles/Makefile.common
?
2017-10-07 13:35:44 +02:00
Gabriel Scherer cc5bd1d199 travis: test 'make clean'
(no change entry needed)
2017-10-07 13:26:58 +02:00
Vincent Laviron 796f419b4c Fix duplication of code in Cmmgen (#1370)
* Fix duplicates in Cmmgen when handling switches with no default and not all cases

* Improve handling of incomplete Lambda switches in Flambda

* Add test (for reference) and changes

* Fix nitpick

* Cleanup: split the switch stores to reflect usage

* Improve compilation of incomplete switches with flambda

* Split switch stores into context-aware and -unaware versions

* Credit reviewers

* Go back to a single Switch.t_store type
2017-10-06 14:44:51 +02:00
octachron 277b22eefc minor changes cleanup
(cherry picked from commit fd7f18f8d35aedc932c174967366837f37f3100d)
2017-10-06 07:37:58 +02:00
Gabriel Scherer 35316cc175 Merge pull request #1345 from stedolan/afl-objects
afl-fuzz instrumentation fix for classes
2017-10-05 21:43:27 +02:00
Florian Angeletti db03cedfdf Merge pull request #830 from Octachron/stdlib_doc_unnested_hierarchy
PR#7363: documentation, start heading levels at 1
2017-10-05 19:26:44 +02:00
Stephen Dolan b5c9755f9c Add tests and Changes entry for afl-fuzz classes fix. 2017-10-05 16:56:11 +01:00
Stephen Dolan 7ed63d4ff3 afl-fuzz instrumentation fix for classes.
Disable class initialisation cache when compiling with afl-fuzz
instrumentation enabled. See MPR#7612
2017-10-05 16:54:10 +01:00
Leo White 689ac00ce1 Fix unboxed types check 2017-10-05 17:03:36 +02:00
Nicolas Ojeda Bar f9290fc864 Add Changes entry 2017-10-05 16:58:36 +02:00
Damien Doligez db88523db3 Fix flexdll section in README (#1359)
Fix flexdll section in `README.win32.adoc`.
Pass the whole OCaml config to the Flexdll Makefile instead of a few chosen variables.
2017-10-05 16:48:08 +02:00
Nicolas Ojeda Bar d0f68c9955 Do not use %S 2017-10-05 14:24:56 +02:00
David Allsopp 3b98adfe2e Hopefully eliminate race condition in AppVeyor build script 2017-10-05 12:16:49 +01:00
Xavier Leroy 044244e9bb Merge pull request #1397 from dra27/simpler-ocamlobjinfo-test
Simplify the tool-ocamlobjinfo test
2017-10-05 08:58:41 +02:00
Gabriel Scherer 302738f5e6 Merge pull request #1396 from ocaml/improve_arg_read_arg
Avoid non-tail recursion in Arg.read_arg
2017-10-04 23:21:49 +02:00
David Allsopp 380989725e Simplify the tool-ocamlobjinfo test 2017-10-04 19:17:43 +01:00
Gabriel Scherer 74ccacd80e Merge pull request #1393 from yallop/config-fix
Restore support for native_c_compiler and bytecomp_c_compiler
2017-10-04 17:40:27 +02:00
alainfrisch 35e15f6029 Avoid non-tail recursion when loading files in Arg.read_arg. 2017-10-04 16:49:42 +02:00
Gabriel Scherer 0e19f896ab Changes: backport GPR#1383 2017-10-04 16:18:40 +02:00
Gabriel Scherer a2a1ea05cd reorder trunk Changes categories 2017-10-04 16:18:40 +02:00
Jeremy Yallop 6c443077d4 Restore support for native_c_compiler and bytecomp_c_compiler
(no change entry needed)
2017-10-04 13:04:41 +01:00
octachron 8609d04ac6 MPR#7363: Changes 2017-10-04 13:05:06 +02:00
octachron 9c8ac99009 fix few documentation headers 2017-10-04 13:05:05 +02:00
octachron e5715c7bf5 PR#7363: add a texinfo title option to ocamldoc 2017-10-04 13:05:05 +02:00
octachron e30e82a219 PR#7363: start documentation headers at {1 2017-10-04 13:05:05 +02:00
Tadeu Zagallo 74ca5ee7a3 PR#6604: Only allow directives with filename and at the beginning of the line (#931) 2017-10-04 10:05:21 +01:00
octachron 03e1a93f0b PR#7363, ocamldoc: implicit level 0 for titles
This commit makes the heading hierarchy of ocamldoc start at {0 rather
than {1. This level {0 should be reserved for global titles, freeing
the use of {1 for normal subtitles.
2017-10-03 23:29:50 +02:00
Xavier Leroy f7010e8398 Split C-- tests off tests/asmcomp and into tests/asmgen
tests/asmgen contains the custom C-- code generator and the tests written in C--
tests/asmcomp contains the tests written in OCaml

The purpose of this split is to make it easier to skip or remove entirely the asmgen tests in the future, and to adapt the other tests to the new test infrastructure.

Also: modernize the asm stubs in asmgen and remove the stubs for no-longer-supported architectures.
2017-10-03 15:43:17 +02:00
Sébastien Hinderer 715fbc49c6 Introduce tools/ci-build-other-configs
Inria's CI uses an "other-configs" job to test various, less
widespread configurations of the OCaml compiler.

Before this commit, the list of configurations to test was part of the
configuration of the Jenkins job itself, making it impossible to
have branch-specific configurations.
This commit introduces the tools/ci-build-other-configs script, which
can vary from branch to branch.

The job's configuration has been updated to execute the script when
it exists and to fallback to the former, built-in list of
configurations on the branches where this script is not present.
2017-10-03 14:24:43 +02:00
Gabriel Scherer 6a236f739d reorder 4.06 change categories 2017-10-03 11:51:46 +02:00
Christophe Raffalli 1d8d66a578 fixed position of last optional last semicolumn in sequence (#1387) 2017-10-03 11:51:46 +02:00
Xavier Leroy e285f426a5 Part of MPR#7642: in tests/asmcomp, keep the default dlcode setting
Probably by mistake a "Clflags.dlcode := false" was added along with the ARM64 port.  As shown in MPR#7642 this produces link errors on ARM if the linker is PIE by default.
2017-10-03 09:42:47 +02:00
Gabriel Scherer 2048876935 minor Changes fix 2017-10-02 14:53:03 +02:00
Gabriel Scherer a202aa032b rename the configure-time safe-string options for clarity
-(un)safe-string becomes -(no-)force-safe-string
-(un)safe-string-default becomes -default-unsafe-string

Config.safe_string (and Clflags.unsafe_string) keep their name for
backward-compatibility, as well as the C define CAML_SAFE_STRING
(which corresponds to -force-safe-string).
2017-10-02 14:42:19 +02:00