Commit Graph

1196 Commits (b6bdf20ff797c07ae099b71d6442b3d9aa442243)

Author SHA1 Message Date
Xavier Leroy 15ac614a89 Experiment: Win32 sockets in non-synchronous mode.
This is an attempt to address PR#4466, #5325, #6771.  Not tested yet.
2015-11-30 11:42:16 +01:00
Mark Shinwell 35dc44a00f Someone didn't compile their code 2015-11-30 11:04:11 +01:00
Mark Shinwell c1c84310b5 Someone didn't compile their code 2015-11-30 09:28:38 +00:00
alainfrisch 6c90da49f1 GPR#210: runtime warnings are disabled by default. 2015-11-30 10:18:10 +01:00
alainfrisch 37ad7ece0e GPR#210: keep unflushed out channels around to be able to flush them during at_exit. 2015-11-30 09:57:30 +01:00
alainfrisch 657e6be3dd Be more consistent in caml_alloc_shr_no_raise: it can never raise. 2015-11-23 13:52:04 +01:00
alainfrisch 95233ec9ca Cosmetic (as suggested by G. Scherer). 2015-11-23 13:51:02 +01:00
alainfrisch 092c5e4506 Fixes for MSVC. 2015-11-23 13:30:34 +01:00
Alain Frisch 4788ab33d6 Merge pull request #283 from mlasson/trunk
Fix memory leaks in intern.c when OOM is raised
2015-11-23 13:25:34 +01:00
Marc Lasson bf0fc9fc9c Apply xleroy patch to implement alloc_shr_no_raise 2015-11-23 12:09:16 +01:00
alainfrisch a9ef6428fc MSVC (at least some old version) does not support inline. Use _inline instead. This #define should perhaps go somewhere else, e.g. caml/misc.h (defined as caml_inline?). 2015-11-23 09:58:44 +01:00
alainfrisch 4c8affc1ca MSVC doesn't support variable declaration within code blocks. 2015-11-23 09:49:23 +01:00
Marc Lasson 448d365d32 Update changelog & remove useless vertical spaces 2015-11-20 17:51:43 +01:00
Marc Lasson 1a2c6310fc Adds a function intern_init to set global state 2015-11-20 17:51:00 +01:00
Marc Lasson 061525dae0 Typo in comment 2015-11-20 17:45:07 +01:00
Marc Lasson 66714a3af1 Use a global variable to implement caml_alloc_shr_no_raise 2015-11-20 17:45:07 +01:00
Marc Lasson 8414d46214 Simplify intern state. 2015-11-20 17:45:07 +01:00
Marc Lasson 15b51b1c7b Assert intern is in a clean state
Assert that intern is in a clean state at the beginning of demarshaling
primitives.
2015-11-20 17:38:35 +01:00
Marc Lasson d6d3744d6f Idempotent intern_cleanup 2015-11-20 17:37:45 +01:00
Marc Lasson 01ef4800b3 alloc_shr is a wrapper around alloc_shr_no_raise
It is explicitly unfolded in the minor_gc.c for performance.
2015-11-20 17:37:45 +01:00
Marc Lasson 522453659a Remove useless declaration in memory.h. 2015-11-20 17:37:45 +01:00
Marc Lasson 4e2891b97b Remove useless stdio #include 2015-11-20 17:37:45 +01:00
Marc Lasson 5766c2de36 Delete stat_alloc_no_raise and duplicate alloc_shr
I replaced all calls to stat_alloc_no_raise by plain mallocs.
Also, I reimplemented alloc_shr_no_raise by duplicating the code of alloc_shr to avoid any overhead induced by an extra function call.
2015-11-20 17:37:45 +01:00
Marc Lasson d4d7bcd48e Fix indentation. 2015-11-20 17:37:45 +01:00
Marc Lasson ddd51af088 Fix memory leaks in intern.c in alloc_shr case
Prevents the function `caml_alloc_shr` to raise an OOM exception
before intern_cleanup could be called (this complete commit 1e62f1b).

It defines a new caml_alloc_shr_no_raise function.
2015-11-20 17:37:45 +01:00
Marc Lasson bd471eb198 Fix a memory leak in concat_array
There is a memory leak when the second or the third call to `caml_stack_alloc`
in `caml_array_concat` raises Out_of_memory. This will fix it.
2015-11-20 17:37:45 +01:00
Marc Lasson de7424404b Fix memory leaks in intern.c when OOM is raised
In the function, `intern_alloc` a call to caml_alloc_for_heap is very likely to
return NULL when reading a big marshaled value. If that happens, before raising
out_of_memory, it should call the `intern_cleanup` function to free the stack
as well as `intern_input` that may have been malloced by `caml_input_val`.
Similarly, `intern_cleanup` should also be called when we are not able to
allocate `intern_obj_table`. To do that, I added a function
`caml_stat_alloc_no_raise` which, like its brother, `caml_stat_alloc` wraps
some debugging information around a call to malloc. I could have used directly
malloc instead of adding a new function to memory.c, as it is done in other
places of the code (it has the drawback of not adding the debug tag).

Note that this fix is not perfect. The function `intern_alloc` could also raise
out_of_memory through its call to `caml_alloc_shr`. It is less likely to happen
since caml_alloc_shr is only called when the input is smaller than Max_wosize
but it could happen. In that case, there will be leak (but a smaller one).
2015-11-20 17:37:45 +01:00
Damien Doligez 60e7055d9f fix wrong C++ bracketing in hash.h 2015-11-20 15:51:37 +01:00
Xavier Leroy bf2033e127 If <stdint.h> not available (e.g. MSVC), define {u,}int16_t types ourselves. 2015-11-19 10:45:54 +01:00
Xavier Leroy 0c5e862a3e GPR#268: Hexadecimal notation for floating-point numbers
Merge of branch 'hex-float'.

- Add support in byterun/floats.c for conversions between floats and strings in hex notation. We cannot rely on the C standard library here because Microsoft consistently fails at supporting hex notation as standardized in C99. Instead, the conversions are implemented from scratch.
- Add support in the lexer so that hex float literals are recognized in OCaml sources.
- Add support in formats. The ISO C99 format letters for hex floats are %a and %A, but %a is already taken. I chose %h and %H, which are rejected today as bad formats (hence no backward incompatibility) and don't mean anything in C either (h is a modifier, not a format letter).
- Add support in printf. All the trimmings are there in the implementation of %h and %H, including sign modifier and fixed precision.
- Benoit Vaugon contributed support in scanf.

Resolved conflicts:
	boot/ocamlc
	boot/ocamldep
	boot/ocamllex
	parsing/lexer.mll
2015-11-19 10:37:20 +01:00
Xavier Leroy 4fd254e325 Merge pull request #224 from ocaml/big-marshal
PR#6910 and GPR#224: extend marshaling to support data encodings beyond 4 Gb
2015-11-19 09:56:43 +01:00
Xavier Leroy e7f339e6bd Improve speed of classify_float
As suggested in the discussion of GPR#272:
- Do not go through fpclassify()  (speedup: 2 to 3)
- Add 64-bit variant of the code  (additional speedup: 10%-20%)
2015-11-15 16:43:46 +01:00
Xavier Leroy dc2a98c3a5 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Continuation of commit dc043a7:
- Protect Sys.command
2015-11-13 14:57:12 +01:00
Jacques Garrigue eb0de16ee0 Fix PR#4166, PR#6959: force linking when calling external C primitives 2015-11-13 13:59:14 +09:00
Xavier Leroy dc043a7b62 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Implementation notes:
- Based on c-cube's GPR#227 code, but many Unix functions were missing.
- For Unix.bind and Unix.connect to a PF_UNIX address, tolerate
  file names whose first character is '\000': in Linux, these have
  a meaning as "abstract socket addresses", and in other operating
  systems, the resulting empty path name causes a EINVAL error
  (tested under MacOS X).
- Very lightly tested.
- win32unix remains to be fixed.
2015-11-11 17:07:44 +01:00
Damien Doligez 7cb9a80744 simplify .gitignore; remove .ignore files and tools/setignore; adjust tools/check-typo 2015-11-06 16:25:05 +01:00
François Bobot 203c444fd4 Make `Pervasives.ldexp` unboxed and noalloc 2015-11-05 13:07:03 +01:00
François Bobot c0f19965f4 Make specialized compare unboxed
- float
    - int32
    - int64
    - nativeint

  Not for int because the comparison is done directly on the untagged version.
  Useful mainly for floats since they can be stored unboxed in records or arrays.
2015-11-05 13:07:03 +01:00
François Bobot 3c76d0678d Make `Sys.time` unboxed and noalloc 2015-11-05 13:07:03 +01:00
alainfrisch 26c9b9007f Add a note suggesting to switch to the emulation of clasify_float as a faster alternative to calling the libc. 2015-11-03 21:07:33 +01:00
alainfrisch 364f1cb79f Merge branch 'trunk' of github.com:ocaml/ocaml into unbox_classify_float 2015-11-03 21:03:07 +01:00
alainfrisch 1f3eac9b94 No need to use CAMLprim for native form of primitives. 2015-11-03 21:02:30 +01:00
Jeremie Dimino 665176d77a Switch a few externals to [@@unboxed]
Switched the following functions:
- {Nativeint,Int32,Int64}.{of,to}_float
- Int{32,64}.float_of_bits
- Int{32,64}.bits_of_float
2015-11-03 17:20:05 +00:00
Xavier Leroy 27c467c777 byterun/ yacc/ : replace some K&R function declarations with proper prototypes. 2015-11-03 11:08:01 +01:00
alainfrisch 96c3a3da75 Avoid boxing floats when calling Pervasives.classify_float. 2015-10-28 16:43:35 +01:00
Mark Shinwell 17e1078cce transl_exception_constructor now uses Immutable 2015-10-28 10:56:49 +00:00
Xavier Leroy 6054bcb3dd GPR#164: more efficient (branchless) implementation of Pervasives.compare
specialized at type 'float'.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16539 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-25 10:21:13 +00:00
Damien Doligez d3f982aaa8 move the new record field of channel to avoid breaking some stubs in JS Core
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 15:03:48 +00:00
Damien Doligez 659615c7b1 fix PR#7003 and a few other bugs caused by misuse of Int_val
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-19 15:47:33 +00:00
Xavier Leroy 782d12c327 Minor fixes following the discussion on pull request 224:
- intern.c: watch out for left shift overflow
- extern.c: refactor caml_output_value_to_block


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16522 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-19 11:21:49 +00:00
Gabriel Scherer 24c118d7b6 fix undefined left shift of negative value.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16520 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-17 14:21:19 +00:00
Gabriel Scherer bedb4e3ac1 Build system: fix a few hardcoded ar commands.
(Daniel Bünzli)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16485 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-09 20:41:57 +00:00
Damien Doligez 3397e7ff16 GPR#243: Faster test suite
(Xavier Leroy)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16466 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-09 15:45:37 +00:00
Xavier Leroy c065a0995c Typo: >> should have been <<.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16425 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-15 14:28:12 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Damien Doligez 76c4f9c009 add create_float_array and deprecate make_float_array
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-07 13:51:27 +00:00
Gabriel Scherer 1fcc11e8cd backtrace: Require caml_val_raw_backtrace_slot to return an immediate value
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:27 +00:00
Gabriel Scherer 8da9ae04bb Adjust documentation
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16368 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:24 +00:00
Gabriel Scherer c94118d61f Only register caml_backtrace_last_exn as root once.
This simplify the code, would have prevented GPR#205 and prepare ground
for upcoming improved backtrace generation.

From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:22 +00:00
Gabriel Scherer 91d1e34e2d Document backtrace infrastructure, make types more explicit
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16366 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:20 +00:00
Gabriel Scherer 23d10e0875 Move backend specific backtrace code to backtrace_prim.c
And share backtrace.c between asmrun and byterun.

From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:18 +00:00
Gabriel Scherer d020ae12af Handle custom block with finalizers in deserialization. Fix PR#3612
(Pierre Chambart)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-16 21:23:49 +00:00
Gabriel Scherer 8851e6b7d5 Allow allocating custom blocks with finalizers in the minor heap.
(Pierre Chambart)

When allocating this kind of blocks to the minor heap, they are
added to 'caml_finalize_table' which is traversed on
'caml_empty_table' to check if any of such block is dead.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16357 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-16 21:23:47 +00:00
Gabriel Scherer ceb5e0baa8 Move bytecode debug info from the OCaml heap to static allocations
There is currently a GC bug in the bytecode debug-info handling, due
to the fact that
  void read_main_debug_info(struct debug_info *di)
is passed a internal pointer in the middle of a custom block inside
the OCaml heap. I could only observe the bug when such custom blocks
are allocated on the minor heap -- which does not happen with the
current implementation, but becomes possible after GPR#92 for example
(which let custom blocks with finalizer be allocated in the
minor heap).

This commit fixes this issue by moving debug_info chunks from the
OCaml heap to the C land, stored in a dynamic table. They are
allocated when caml_add_debug_info is called, and removed when
caml_remove_debug_info is called.

(Another approach would be to keep the debug_info inside the OCaml
heap, but make sure that there are no dangling internal pointers. See
GPR#228 for an attack of this by Mark Shinwell.)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16356 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-16 20:56:12 +00:00
Gabriel Scherer 9a533a50cd make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16352 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:59 +00:00
Gabriel Scherer a69e3e3099 add primitive caml_sys_isatty; fix bootstrap
(Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:47 +00:00
Gabriel Scherer 162cbc8d1e minor: explicit a precondition on rootlist->level to please Clang analyzer
globroots.c:98:21: warning: Dereference of undefined pointer value
    e->forward[i] = update[i]->forward[i];
                    ^~~~~~~~~~~~~~~~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16336 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-05 07:50:23 +00:00
Gabriel Scherer 7a87170dfc fix the backtrace.c fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16335 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-05 07:50:21 +00:00
Gabriel Scherer 32511c53af fix an issue spotted by the Clang analyzer (potential malloc(0) call)
byterun/backtrace.c:142:12: warning: Call to 'malloc' has an allocation size of 0 bytes
  events = malloc(*num_events * sizeof(struct ev_info));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 20:32:09 +00:00
Xavier Leroy ac62e93d6b Fix call to undeclared function "caml_ml_enable_runtime_warnings" in startup_aux.c
This is a follow-up to commit r16245, PR#6902, GPR#210.
- Runtime warning machinery was local to io.c; make it globally usable.
- Move definitions and accessor functions to misc.c and gc_ctrl.c
  by analogy with other configurable runtime parameters.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16325 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 09:38:23 +00:00
Xavier Leroy e2d0a13165 Add alternate marshaling format, used when marshaled data is >= 4 Gb.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16324 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-03 12:27:15 +00:00
Gabriel Scherer 1957021b27 make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 18:34:09 +00:00
Gabriel Scherer 6e224a76a1 GPR#221: use CAMLnoreturn_{start,end} in the same way as CAMLunused_{start,end}
This is ugly. C pragmas are ugly. At least we're ugly and consistent now.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16315 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:24 +00:00
Gabriel Scherer 2f2b2f0bd1 GPR#165: refactor and document CAMLunused{,_start,_end}
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:22 +00:00
Gabriel Scherer edb714dc15 GPR#221: keep Noreturn and add CAMLnoreturn_{start,end}
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16313 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:20 +00:00
Gabriel Scherer 98456ca63b GPR#165: reintroduce 'CAMLunused' for backward compatibility reasons.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16312 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:18 +00:00
Gabriel Scherer 370677b639 PR#6649, GPR#222: accept (int_of_string "+3")
(Christopher McAlpine)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:32:44 +00:00
Gabriel Scherer a3041d9550 Added the missing POSIX signals in Sys (Guillaume Bury)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16302 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:45 +00:00
Damien Doligez 1326b12f74 merge branch 4.02 from rev 16205 to rev 16238
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-29 22:19:24 +00:00
Gabriel Scherer 394d8795a9 GPR#165: Added pragmas for MSVC do disable the unused variable warning for CAMLparam and CAMLlocal.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16266 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:56 +00:00
Gabriel Scherer 1c29e17fd3 GPR#165: Missing Noreturn moved before the functions and added a missing undef in socketaddr.c
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16265 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:55 +00:00
Gabriel Scherer f7199a9ee2 GPR#165: Fixed small typo it should be _MSC_VER not __MSC_VER
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16264 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:53 +00:00
Gabriel Scherer 34ab11fbcc GPR#165: Changed the definition of the Noreturn macro to also work with Visual Studio Version >= 2008 using the __declspec(noreturn).
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:50 +00:00
Gabriel Scherer 75a7b333ed GPR#165: Added define guards around the macros in unixsupport and for the isnan and isfinite macro.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16261 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:48 +00:00
Xavier Leroy bb86f5b545 Preliminary support for hexadecimal notation for FP numbers.
- Primitives:
     caml_float_of_string  extended to recognize "0x" hexa notation
     caml_hexstring_of_float  new primitive
  We do not assume hex floats are supported by the C standard library.
  Instead, conversions hex string <-> float are implemented manually.
- Printf: hex FP output supported with formats %h / %H
- Scanf: remains to be updated (see TODO in stdlib/scanf.ml)


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/hex-float@16257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 09:29:33 +00:00
Gabriel Scherer 7d1f7af832 fix "compatibility macros for runtime constants that recently changed names" (svn id: 16008 ; git commit: 8c1f0cff)
(Thomas Refis)

The constants weren't just renammed: they previously denoted a size in bytes,
they now denote a size in words.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16251 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:04 +00:00
Alain Frisch 49a2533472 PR#6902, GPR#210: runtime emits a warning when finalizing an I/O channel which is still open.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 13:11:26 +00:00
Xavier Leroy 60384ed840 For read-and-clear, use GCC/Clang atomic builtins if available.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16244 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 12:38:55 +00:00
Xavier Leroy 58c07fa89e PR#6722: compatibility with x32 architecture (x86-64 in ILP32 mode)
configure: deselect ocamlopt, which is not supported
signals_machdep.h: use i386 instruction sequence, not amd64.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16243 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 12:31:42 +00:00
Xavier Leroy a1bafbbb67 PR#6316: Scanf.scanf failure on %u formats when reading big integers.
The approach implemented is the second one suggested by Benoît Vaugon in the PR:
- The int_of_string functions accept a "0u" prefix meaning "decimal unsigned".
- The '%u' format of the scanf functions adds this "0u" prefix before conversion.
This is consistent with the current handling of unsigned hexa, octal, and binary numbers.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16241 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 09:36:03 +00:00
Damien Doligez 4b83d53fbc update .depend and bootstrap compilers after 4.02 merge
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16218 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 18:34:07 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Alain Frisch 30450e77df Fix GPR#205: Clear caml_backtrace_last_exn before registering as root.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-23 16:10:03 +00:00
Alain Frisch cd04d52523 #6902: revert commit 15817 (it causes memory leaks on input channels).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16174 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-15 08:21:36 +00:00
Damien Doligez 6e5c745447 GPR#191 followup: add `Is_in_static_data` to address_class.h
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16167 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-09 16:40:05 +00:00
Mark Shinwell 8df90ef051 Port fix for GPR#191 to trunk (making gc.h and some part of memory.h public)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16163 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-08 13:21:42 +00:00
Alain Frisch 311799dbf5 Fix bug introduced in commit 15830 (for #6468): caml_init_code_fragments also needs to be called in case of 'ocamlc -custom'. One should really think about sharing code between caml_main and caml_startup_code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16077 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-05 14:16:22 +00:00
Damien Doligez 0477bab3bf deduplicate some startup code and fix PR#6808: the parsing of OCAMLRUNPARAM is too lax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-04 15:44:40 +00:00
Gabriel Scherer 70450de8a1 PR#6693: also build libasmrun_shared.so and lib{asm,caml}run_pic.a
(Peter Zotov, review by Mark Shinwell)

NB: after applying this change you need to run ./configure again.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-02 15:30:41 +00:00
Gabriel Scherer f6018b0ef1 PR#6846: build failure with prefixed tools
(Niels Ole Salscheider)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16048 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 20:50:20 +00:00