<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>This is indeed a problem in Erlang VM code (shallow copy of
      inflate state)
      <br>
      that has existed since R16B03, but not caused actual problem until
      zlib v1.2.9.
      <br>
      <br>
      Fix coming up. Here is a preliminary patch for the impatient.
      <br>
      <br>
      diff --git a/erts/emulator/beam/external.c
      b/erts/emulator/beam/external.c
      <br>
      index beed847..1c4fff5 100644
      <br>
      --- a/erts/emulator/beam/external.c
      <br>
      +++ b/erts/emulator/beam/external.c
      <br>
      @@ -1431,6 +1431,10 @@ static B2TContext*
      b2t_export_context(Process* p, B2TContext* src)
      <br>
           if (ctx->state >= B2TDecode &&
      ctx->u.dc.next == &src->u.dc.res) {
      <br>
               ctx->u.dc.next = &ctx->u.dc.res;
      <br>
           }
      <br>
      +    else if (ctx->state == B2TUncompressChunk) {
      <br>
      +        int cres = inflateCopy(&ctx->u.uc.stream,
      &src->u.uc.stream);
      <br>
      +        ASSERT(cres == Z_OK); (void)cres;
      <br>
      +    }
      <br>
           hp = HAlloc(p, PROC_BIN_SIZE);
      <br>
           ctx->trap_bin = erts_mk_magic_binary_term(&hp,
      &MSO(p), context_b);
      <br>
           return ctx;
      <br>
      <br>
      <br>
      /Sverker, Erlang/OTP
    </p>
    <br>
    <div class="moz-cite-prefix">On 01/19/2017 04:14 AM, Michel
      Boaventura wrote:<br>
    </div>
    <blockquote
cite="mid:CABCUB6j5mxBCf0Ht-V2a1AN1gR-A_JtRB5bBDUraJSgyTzdLAQ@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi all,

I've build erlang 19 from scratch on my gentoo machine but can't use
dialyzer, because it complains my beam files weren't compiled with
debug_info.

I've read and debugged a log of dialyzer and erlang code and find out the
issue is that for some reason erlang can't parse the abstract part of the
files.

To check this I save the abstract part on a file and tried to parse it on
my gentoo machine and on a Ubuntu server I have access. For some reason I
don't know it reads with no problem Ubuntu but gives me an invalid arg on
gentoo.

I'm very new to erlang and have no clue of how to debug further. The binary
is attached and I'm reading it like:

{ok, [Binary]} = <a class="moz-txt-link-freetext" href="file:consult(">file:consult(</a>"Abstr").
Term = binary_to_term(Binary).

ps: I've sent a message similar to this one on this list, but since it was
my first one I think it wasn't accepted (and I do apologize for the double
post if you received it). But after it I've discovered the problem with
binary_to_term, so that message isn't so useful anyway.

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>