utop crashed upon "#show Base.Error;;"
hansonchar opened this issue · 2 comments
hansonchar commented
Steps to reproduce the crash
$ utop
utop # #require "base";;
utop # #show Base.Error;;
Fatal error: exception File "typing/env.ml", line 1177, characters 26-32: Assertion failed
Raised at Env.find_type_data in file "typing/env.ml", line 1177, characters 26-38
Called from Env.find_type in file "typing/env.ml", line 1195, characters 2-24
Called from Env.find_type_expansion in file "typing/env.ml", line 1391, characters 13-31
Called from Printtyp.normalize_type_path in file "typing/printtyp.ml", line 635, characters 26-55
Re-raised at Printtyp.path_size in file "typing/printtyp.ml", line 661, characters 20-246
Called from Printtyp.set_printing_env.(fun) in file "typing/printtyp.ml", line 690, characters 25-63
Called from Ident.iter in file "typing/ident.ml", line 324, characters 16-32
Called from Env.IdTbl.iter in file "typing/env.ml", line 467, characters 6-68
Called from Env.iter_env in file "typing/env.ml", line 1483, characters 2-59
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Env.run_iter_cont in file "typing/env.ml", line 1522, characters 2-29
Called from Printtyp.best_type_path in file "typing/printtyp.ml", line 762, characters 36-70
Called from Printtyp.printer_iter_type_expr in file "typing/printtyp.ml", line 798, characters 21-37
Called from Printtyp.prepare_type in file "typing/printtyp.ml", line 1047, characters 2-18
Called from Printtyp.tree_of_type_decl in file "typing/printtyp.ml", line 1348, characters 8-23
Called from Printtyp.tree_of_type_declaration in file "typing/printtyp.ml", line 1479, characters 13-38
Called from Printtyp.trees_of_recursive_sigitem_group.display in file "typing/printtyp.ml", line 1881, characters 52-73
Called from Stdlib__List.map in file "list.ml", line 92, characters 20-23
Called from Stdlib__Fun.protect in file "fun.ml", line 33, characters 8-15
Re-raised at Stdlib__Fun.protect in file "fun.ml", line 38, characters 6-52
Called from Printtyp.wrap_env in file "typing/printtyp.ml", line 1763, characters 13-22
Called from Printtyp.trees_of_recursive_sigitem_group in file "typing/printtyp.ml", line 1888, characters 6-62
Called from Misc.try_finally in file "utils/misc.ml", line 31, characters 8-15
Re-raised at Misc.try_finally in file "utils/misc.ml", line 45, characters 10-56
Called from Printtyp.tree_of_signature_rec.collect_trees_of_rec_group in file "typing/printtyp.ml", line 1871, characters 6-92
Called from Stdlib__List.map in file "list.ml", line 92, characters 20-23
Called from Printtyp.tree_of_signature.(fun) in file "typing/printtyp.ml", line 1862, characters 24-62
Called from Printtyp.wrap_env in file "typing/printtyp.ml", line 1763, characters 13-22
Called from Printtyp.tree_of_modtype in file "typing/printtyp.ml", line 1837, characters 27-47
Called from Printtyp.tree_of_module in file "typing/printtyp.ml", line 1920, characters 30-59
Called from Printtyp.trees_of_recursive_sigitem_group.display in file "typing/printtyp.ml", line 1881, characters 52-73
Called from Printtyp.trees_of_recursive_sigitem_group in file "typing/printtyp.ml", line 1884, characters 37-46
Called from Misc.try_finally in file "utils/misc.ml", line 31, characters 8-15
Re-raised at Misc.try_finally in file "utils/misc.ml", line 45, characters 10-56
Called from Printtyp.tree_of_signature_rec.collect_trees_of_rec_group in file "typing/printtyp.ml", line 1871, characters 6-92
Called from Stdlib__List.map in file "list.ml", line 92, characters 20-23
Called from Stdlib__List.map in file "list.ml", line 92, characters 32-39
Called from Stdlib__List.map in file "list.ml", line 92, characters 32-39
Called from Stdlib__List.map in file "list.ml", line 92, characters 32-39
Called from Printtyp.tree_of_signature.(fun) in file "typing/printtyp.ml", line 1862, characters 24-62
Called from Printtyp.wrap_env in file "typing/printtyp.ml", line 1763, characters 13-22
Called from Printtyp.signature in file "typing/printtyp.ml", line 1962, characters 35-57
Called from Stdlib__Format.output_acc in file "format.ml", line 1360, characters 4-20
Called from Stdlib__Format.output_acc in file "format.ml", line 1360, characters 4-20
Called from Stdlib__Format.kfprintf.(fun) in file "format.ml", line 1421, characters 16-34
Called from Misc.try_finally in file "utils/misc.ml", line 31, characters 8-15
Re-raised at Misc.try_finally in file "utils/misc.ml", line 45, characters 10-56
Called from Topdirs.show_prim in file "toplevel/topdirs.ml", line 386, characters 4-110
Re-raised at Topdirs.trim_signature.(fun) in file "toplevel/topdirs.ml", line 356, characters 11-590
Called from Topcommon.try_run_directive in file "toplevel/topcommon.ml", line 369, characters 65-70
Called from Topeval.execute_phrase in file "toplevel/byte/topeval.ml", line 181, characters 6-42
Re-raised at Topeval.execute_phrase in file "toplevel/byte/topeval.ml", line 184, characters 4-13
Called from UTop_main.execute_phrase in file "src/lib/uTop_main.ml", line 791, characters 12-47
Called from UTop_main.loop in file "src/lib/uTop_main.ml", line 875, characters 18-49
Re-raised at Location.report_exception.loop in file "parsing/location.ml", line 959, characters 14-25
Called from UTop.get_message in file "src/lib/uTop.ml", line 129, characters 2-11
Called from UTop_main.loop in file "src/lib/uTop_main.ml", line 894, characters 21-61
Called from UTop_main.main_aux in file "src/lib/uTop_main.ml", line 1621, characters 8-17
Called from UTop_main.main_internal in file "src/lib/uTop_main.ml", line 1636, characters 4-25
version
$ utop -version
The universal toplevel for OCaml, version 2.11.0, compiled for OCaml version 5.0.0
emillon commented
Hi,
Thanks for the bug report, in particular for the backtrace which I wasn't able to get myself!
This seems to be an issue with the ocaml toplevel itself, not specific to utop
. It appears with utop
because it implicitly sets -short-paths
. It can be reproduced with the toplevel with:
% ocaml -short-paths
OCaml version 5.0.0
Enter #help;; for help.
# #use "topfind";;
- : unit = ()
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
- : unit = ()
# #require "base";;
...
# #show Base.Error;;
Fatal error: exception File "typing/env.ml", line 1177, characters 26-32: Assertion failed
Raised at Env.find_type_data in file "typing/env.ml", line 1177, characters 26-38
Called from Env.find_type in file "typing/env.ml", line 1195, characters 2-24
Would you like to report that upstream here?
Thanks
hansonchar commented