[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#583300: upstream bug



found 583300 3.11.2-1
forwarded 583300 http://caml.inria.fr/mantis/view.php?id=5064
tags 583300 + upstream
thank you

Here is a small testcase that when compiled with ocamlopt crashes at
runtime. It uses no external C calls, just basic OCaml language.
ocamlopt creates a call to caml_equal C code at runtime, and it doesn't
catch the stack overflow there.

See the upstream bugreport for more information, and a simple solution.

Testcase:
type t = int*int
let rec foo (n:t) (m:t) =
    if n = m then 42
    else
    let nx, _ = n in
    let r = foo (nx+1, 0) m in
        r + 7

let _ = foo (4,0) (0,0)

Best regards,
--Edwin



Reply to: