| Anonymous | Login | Signup for a new account | 2013-05-19 11:47 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005836 | OCaml | OCaml tools (ocaml{lex,yacc,dep,browser}) | public | 2012-11-21 10:10 | 2012-11-21 14:11 | ||||||
| Reporter | pboutill | ||||||||||
| Assigned To | xclerc | ||||||||||
| Priority | low | Severity | minor | Reproducibility | always | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | x86_64 | OS | MacOS | OS Version | 10.8 | ||||||
| Product Version | 4.00.1 | ||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0005836: Printing forced lazy value in ocamldebug | ||||||||||
| 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 "<lazy>" 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 = <lazy> (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) | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-11-21 10:10 | pboutill | New Issue | |
| 2012-11-21 14:11 | xclerc | Assigned To | => xclerc |
| 2012-11-21 14:11 | xclerc | Status | new => assigned |
| Copyright © 2000 - 2011 MantisBT Group |