Commit Graph

530 Commits (ff6c5b70ceadeb50979791056031f5fc8f36455b)

Author SHA1 Message Date
Damien Doligez 70901f2533 remove compiler flags that were committed by mistake in rev 15975
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15977 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-01 15:17:58 +00:00
Damien Doligez b014f28923 PR#6776: Failure to kill the "tick" thread, segfault when exiting the runtime
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15975 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-31 20:46:10 +00:00
Jérémie Dimino 837f94c3a0 PR#6078: Include signals.h in {nat,}dynlink.c
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-25 15:50:27 +00:00
Jérémie Dimino fae584230d PR#6078: release the runtime system when calling caml_dlopen
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15878 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-05 12:47:35 +00:00
Gabriel Scherer 304c9c91a5 PR#6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=b
(Peter Zotov and Jake Donham,
 review by Gabriel Scherer and Jacques-Henri Jourdan)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15830 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 14:10:12 +00:00
Damien Doligez 66af6470a6 PR#5418 (comments) : generate dependencies with $(CC) instead of gcc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-20 17:02:26 +00:00
Gabriel Scherer 7ca29ef3f7 PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header name clashes
(Jérôme Vouillon and Adrien Nader and Peter Zotov)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 14:41:49 +00:00
Gabriel Scherer 65758c08dd PR#6729: minor Makefile.nt fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15755 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 10:43:38 +00:00
Gabriel Scherer f22564b84d PR#6729: Makefile: remove suffix rules to avoid -jN race conditions
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15751 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 08:44:48 +00:00
Gabriel Scherer ac04e860ab Since r10c, Android NDK includes sys/ucontext.h.
From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15665 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 22:35:57 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Mark Shinwell 526f7bbf40 PR#6554: race condition in caml_get_raw_backtrace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15211 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-11 11:11:42 +00:00
Xavier Leroy b868c05ec9 PR#6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrown
types {,u}int{32,64}.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-27 09:58:33 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Mark Shinwell e17e2b19da PR#6507: [caml_bottom_of_stack] incorrectly set
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15076 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-08 22:17:56 +00:00
Mark Shinwell 5208fbc99f mantis 6489 (fix by Richard Jones)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15002 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-16 06:35:43 +00:00
Xavier Leroy 25b93e0823 Reflecting commit 14978 on version/4.02:
PR#6268: -DMODEL_$(MODEL) not passed when building asmrun/arm.p.o


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-10 08:45:47 +00:00
Xavier Leroy dbea9ee230 Reflecting commit r14943 on version/4.02:
PR#6082: on x86-32, enforce 16-byte stack alignment for compatibility
with recent GCC and Clang.  Win32/MSVC keeps 4-byte stack alignment.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14944 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-02 17:11:40 +00:00
Mark Shinwell 286af5b06a merge github.com/ocaml/ocaml/pull/56.diff, from Anil, part 1: fix support for PowerPC/BSD backtraces
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14854 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-13 13:14:12 +00:00
Gabriel Scherer 4f913f2498 reinstate the deprecated primitive caml_get_exception_backtrace
Jacques-Henri initially removed the primitive, which is deprecated
since 4.01, but I suspect there still are uses in the wild. I guess we
should wait for a few more versions.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14780 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:53 +00:00
Gabriel Scherer ebd3778122 factor the pointers-into-ints cleverness through pair of macros
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:52 +00:00
Gabriel Scherer 3fe8311b50 typos
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14777 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:49 +00:00
Gabriel Scherer 1fdea57c4c Printexc: OCaml-friendly access to individual backtrace slots
(Patch by Jacques-Henri Jourdan)

There are several changes:

- `raw_backtrace` is no longer an abstract type, but rather an
  `raw_backtrace_slot array`, where `raw_backtrace_slot` is a new
  abstract type. `raw_backtrace_slot` elements are hashable and
  comparable. At runtime, values of this type contain either
  a bytecode pointer or a frame_descr pointer. In order to prevent the
  GC from walking through this pointer, the low-order bit is set to
  1 when stored in the array.

- The old `loc_info` type is know public, renamed into `backtrace_slot`:

      type backtrace_slot =
        | Known_location of bool   (* is_raise *)
                          * string (* filename *)
                          * int    (* line number *)
                          * int    (* start char *)
                          * int    (* end char *)
        | Unknown_location of bool (*is_raise*)

- new primitive :

    val convert_raw_backtrace_slot: raw_backtrace_slot -> backtrace_slot

  Rather than returning an option, it raises Failure when it is not
  possible to get the debugging information. It seems more idiomatic,
  especially because the exceptional case cannot appear only for a part
  of the executable.

- the caml_convert_raw_backtrace primitive is removed; it is more
  difficult to implement in the C side because of the new exception
  interface described above.

- In the bytecode runtime, the events are no longer deserialized once
  for each conversion, but once and for all at the first conversion,
  and stored in a global array (*outside* the OCaml heap), sorted by
  program counter value. I believe this information should not take
  much memory in practice (it uses the same order of magnitude memory
  as the bytecode executable). It also makes location lookup much more
  efficient, as a dichomoty is used instead of linear search as
  previously.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14776 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:47 +00:00
Mark Shinwell 9419b6c909 fixed bug in native caml_raise_with_string, and synced code in byterun/fail.c for that function
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14772 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 15:33:02 +00:00
Xavier Leroy 44ac495ee3 Follow-up to r14763: use caml_stat_free instead of plain free.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14764 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-08 07:10:56 +00:00
Xavier Leroy 4fde43407f Eradicate one more sprintf().
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 17:56:53 +00:00
Xavier Leroy b691a28d15 Some updates for SPARC
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14731 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 18:20:33 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Damien Doligez 7303ac34ca fix some of the whitespace problems in the source
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 10:17:02 +00:00
Gabriel Scherer de4f4cf8b3 PR#6358: obey DESTDIR in install targets
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 07:06:17 +00:00
Luc Maranget c2a88c27fd #PR6269 Optimized string matching
Noticed that I had to bootstrap to test on ARM, so I commit  a new bootstrap
compiler.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 17:02:44 +00:00
Damien Doligez aa58e55958 port to cygwin-64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14337 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-03 14:43:02 +00:00
Xavier Leroy 7984a93671 Bring stack backtraces up-to-date on PowerPC, incl. reraise.
Tested on PowerPC/Linux.  Needs testing on PowerPC/MacOS X.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14324 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-28 14:43:56 +00:00
Alain Frisch 7335d5f68f caml_backtrace_pos is a 32-bit integer under amd64.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-19 18:01:05 +00:00
Alain Frisch df7e6c1ded Missing include (==> implicit declaration of function 'caml_named_value').
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14294 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-15 15:09:51 +00:00
Alain Frisch b911754434 Simplify special logic for array bound error (allocate the exception value from Pervasives).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14275 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-08 16:18:21 +00:00
Alain Frisch 7bb3e64160 Do not introduce Obj.raw_tag.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-06 10:57:20 +00:00
Alain Frisch 8757e726f4 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14263 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-04 15:17:29 +00:00
Alain Frisch a96fb5be45 Fix Out_of_memory/Stack_overflow.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14237 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-18 15:14:20 +00:00
Alain Frisch fc3a6d4be0 Also adapt the native system.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14236 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-18 14:15:27 +00:00
Alain Frisch 804007bfc5 Support for AMD64, Intel syntax (i.e. MVSC 64 port).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14234 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-15 14:13:26 +00:00
Alain Frisch f2597364a2 Support the two variants on i386, intel syntax (i.e. Win32 msvc port).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-15 13:09:01 +00:00
Alain Frisch 784b0b3d6e Support the two variants on i386.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14231 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-15 12:38:11 +00:00
Alain Frisch 164c307ae3 Support for raise variants in ocamlopt. Only amd64 for now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14226 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 14:33:27 +00:00
Damien Doligez 7844495624 Merge branch 4.01 from branching point to 4.01.0+rc1
Command line used:
  svn merge --accept postpone -r 13776:14055 $REPO/version/4.01 .


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-04 15:12:37 +00:00
Damien Doligez 5fbcc8e6ae PR#4243: make the Makefiles parallelizable
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13931 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-24 14:39:31 +00:00
Xavier Leroy 055d5c0379 Port to the ARM 64-bits (AArch64) architecture (experimental).
Merge of branch branches/arm64.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13909 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-18 16:09:20 +00:00
Wojciech Meyer fdf9cde11d build: select win32 variants of unix and graph for mingw.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13856 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:58:34 +00:00
Xavier Leroy bfc08c41ac PR#6049: support for OpenBSD/macppc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13835 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-24 08:17:30 +00:00
Gabriel Scherer b06701e207 implement a caml_stash_current_backtrace primitive to save the call stack at any point
This commit only implements runtime support in asmrun/ and byterun/.
The more subjective Printexc interface will come separately.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13813 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 14:12:02 +00:00