Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamldebug segfault on install_printer using module aliasing #7258

vicuna opened this issue May 14, 2016 · 2 comments


None yet
1 participant
Copy link

commented May 14, 2016

Original bug ID: 7258
Reporter: pboutill
Status: resolved (set by @xavierleroy on 2017-02-18T17:16:50Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.03.0
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Monitored by: @gasche

Bug description

Consider the file

module type B =
    type t
    val print : Format.formatter -> t -> unit

module Foo :
  module Bar : B
end =
    module Bar : B =
        type t = int
        let print = Format.pp_print_int

module FooBar = Foo.Bar
$ ocamlc -c
$ ocamlc -debug -o a.out
$ ocamldebug a.out
(ocd) load_printer "install_printer.cmo"
File ./install_printer.cmo loaded

Now if you install_printer Install_printer.Foo.Bar.print everything is fine BUT
if you install_printer Install_printer.FooBar.print it segfault under MacOS and Debian with 4.02 and 4.03


This comment has been minimized.

Copy link

commented Feb 18, 2017

Comment author: @xavierleroy

Tentative fix in commits [trunk b350002] and [4.05 b43beee], will be in release 4.05.

@vicuna vicuna closed this Feb 18, 2017


This comment has been minimized.

Copy link

commented May 5, 2017

Comment author: nbb

i saw i think the same bug with Lacaml printers:

directory ~/.opam/4.04.0+flambda/lib/lacaml

load_printer bigarray.cma
load_printer lacaml.cma

install_printer Lacaml.Io.pp_fmat segfaults while
install_printer Lacaml__io.pp_fmat works fine.

@vicuna vicuna added the tools label Mar 14, 2019

@vicuna vicuna added this to the 4.05.0 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.