Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007914OCamltools (ocaml{lex,yacc,dep,debug,...})public2019-02-08 11:402019-02-12 20:54
Reporterherbelin 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version4.06.1 
Target VersionFixed in Version 
Summary0007914: ocamldebug hangs or crashes on printing lazy values with custom printer
DescriptionMPR#6684 was about printing a lazy value in ocamldebug with the generic printer.
It was fixed and this was very helpful. There is however a similar problem when trying to print lazy values with a custom printer. It either crashes with:

Fatal error: exception End_of_file
Segmentation fault

or hangs (presumably on an input_value trying to fetch the lazy value, though not fully sure on the diagnostic).

The same actually happens when printing functions with a custom printer (though the need is probably less common).

I feel a bit powerless to help more.
Steps To Reproduceprintf "let n = lazy (1+1) in n" > a.ml
printf "let f n = print_int (Lazy.force n)" > p.ml
ocamlc -g a.ml
ocamlc -c p.ml
ocamldebug ./a.out <<EOF
load_printer p.cmo
install_printer P.f
break @ "a" # 21
run
print n
EOF
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-02-08 11:40 herbelin New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker