You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5836 Reporter: pboutill Assigned to:@xclerc Status: closed (set by @xavierleroy on 2016-12-07T10:37:08Z) Resolution: fixed Priority: low Severity: minor Platform: x86_64 OS: MacOS OS Version: 10.8 Version: 4.00.1 Target version: 4.02.2+dev / +rc1 Fixed in version: 4.03.0+dev / +beta1 Category: tools (ocaml{lex,yacc,dep,debug,...}) Duplicate of:#6684
Bug description
Ocamldebug segfault when you try to print a forced lazy value. It is because of a marshall error.
I do not exept it to print the value but I would enjoy if i could say "" instead of segfault.
This way I won't loose my debugging session because I forgot that there are lazy stuff in the record I want to print ...
Original bug ID: 5836
Reporter: pboutill
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2016-12-07T10:37:08Z)
Resolution: fixed
Priority: low
Severity: minor
Platform: x86_64
OS: MacOS
OS Version: 10.8
Version: 4.00.1
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.03.0+dev / +beta1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Duplicate of: #6684
Bug description
Ocamldebug segfault when you try to print a forced lazy value. It is because of a marshall error.
I do not exept it to print the value but I would enjoy if i could say "" instead of segfault.
This way I won't loose my debugging session because I forgot that there are lazy stuff in the record I want to print ...
Steps to reproduce
$ echo "let k = Lazy.from_fun (fun () -> 1) in" > ex.ml
$ echo "print_int (Lazy.force k)" >> ex.ml
$ ocamlc -g -o ex ex.ml
$ ocamldebug ./ex
OCaml Debugger version 4.00.1
(ocd) break @ Ex 2
Loading program... done.
Breakpoint 1 at 8572 : file ex.ml, line 1, characters 9-36
(ocd) r
Time : 15 - pc : 8576 - module Ex
Breakpoint : 1
2 <|b|>print_int (Lazy.force k)
(ocd) p k
k : int Lazy.t =
(ocd) s
Time : 16 - pc : 7804 - module CamlinternalLazy
24 <|b|>let closure = (Obj.obj (Obj.field (Obj.repr blk) 0) : unit -> 'arg) in
(ocd)
Time : 17 - pc : 7824 - module CamlinternalLazy
25 <|b|>Obj.set_field (Obj.repr blk) 0 raise_undefined;
(ocd)
Time : 18 - pc : 7840 - module CamlinternalLazy
26 <|b|>try
(ocd)
Time : 19 - pc : 8532 - module Ex
1 let k = Lazy.from_fun (fun () -> <|b|>1) in
(ocd)
Time : 20 - pc : 7864 - module CamlinternalLazy
28 <|b|>Obj.set_field (Obj.repr blk) 0 (Obj.repr result); (* do set_field BEFORE set_tag *)
(ocd)
Time : 21 - pc : 7884 - module CamlinternalLazy
29 <|b|>Obj.set_tag (Obj.repr blk) Obj.forward_tag;
(ocd)
Time : 22 - pc : 7908 - module CamlinternalLazy
29 Obj.set_tag (Obj.repr blk) Obj.forward_tag<|a|>;
(ocd)
Time : 23 - pc : 8676 - module Ex
2 print_int (Lazy.force k)<|a|>
(ocd) p k
Fatal error: exception End_of_file
Segmentation fault: 11
Additional information
Same behavior under debian amd64 3.12(.1)
The text was updated successfully, but these errors were encountered: