[erlang-bugs] Possible Dialyzer bug (reproducible test case)

Jesper Louis Andersen <>
Thu Jan 16 16:09:07 CET 2014

I may be totally off here, but I have a strange bug which I have seen twice
now on R16B03, OSX for the Dialyzer. To reproduce it, execute the following

# Clone repository and force a specific version
; git clone https://github.com/jlouis/msgpack-erlang.git
; cd msgpack-erlang
; git checkout origin/dialyzer-failure
; make
; make build_plt # Takes about 2 minutes
; make dialyzer

Gives the following:

=ERROR REPORT==== 16-Jan-2014::15:52:18 ===
Error in process <0.67.0> with exit value:

dialyzer: Analysis failed with error:
Last messages in the log cache:
  Reading files and computing callgraph... done in 0.27 secs
  Removing edges... done in 0.04 secs

=ERROR REPORT==== 16-Jan-2014::15:52:18 ===
Error in process <0.69.0> with exit value:

make: *** [dialyzer] Error 1

If you run `git show origin/dialyzer-failure` you have the following patch

diff --git a/include/msgpack.hrl b/include/msgpack.hrl
index 6ef046d..4796492 100644
--- a/include/msgpack.hrl
+++ b/include/msgpack.hrl
@@ -63,8 +63,8 @@
           impl = erlang      :: erlang | nif,
           allow_atom = none  :: none | pack, %% allows atom when packing
           enable_str = false :: boolean(), %% true for new spec
-          ext_packer = undefined :: msgpack_ext_packer(),
-          ext_unpacker = undefined :: msgpack_ext_unpacker(),
+          ext_packer = undefined :: undefined | msgpack_ext_packer(),
+          ext_unpacker = undefined :: undefined | msgpack_ext_unpacker(),
           original_list = []       :: msgpack_list_options()

Undoing this patch chunk makes the dialyzer report a slew of warnings, but
not fail.

Is it possible that someone can try doing the same on another setup to
verify the presence/absence of the error? Also preferable on older releases
to make a target for bisection.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140116/b8e14a4d/attachment.html>

More information about the erlang-bugs mailing list