[erlang-bugs] zlib binary fails to round trip

Matthias Lang matthias@REDACTED
Wed Jan 23 22:55:34 CET 2008


Paul Mineiro writes:

 > I can only reproduce this on a feisty box running 11b-2 (my bad, didn't
 > notice the version difference at first). My mac has 11b-5 and doesn't have
 > the problem.

 > However, the problem under 11b-2 is data dependent so it's possible that
 > it still exists under 11b-5 and we just don't know how to tickle it.  Do
 > you have an 11b-2 setup you can fire up to investigate?

It fails for me too on R11B-2 compiled from source on an x86 Debian
box (see below).

It works for R11B-4 and R11B-5.

>From the R11B-3 release notes:

   OTP-6394  The version of zlib (http://zlib.net) linked into run-time
	      system has been updated to version 1.2.3.

It looks like R11B-2 uses zlib 1.1.4. 

I had a bit of a go at debugging but lost interest. Basically I tried
to show that using zlib 1.1.4 directly would also fail to decompress
the data. But I failed to do that, which may be because it's late, or
because the problem is more subtle.

Matt

----------------------------------------------------------------------

tmp >/usr/local/src/otp_src_R11B-2/bin/erl
Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.5.2  (abort with ^G)
1> [ zlib:unzip (zlib:zip (Bin)) || { ok, Bin } <- [ file:read_file ("mega") ] ].
** exited: {data_error,[{zlib,call,3},
                        {zlib,unzip,1},
                        {erl_eval,do_apply,5},
                        {erl_eval,eval_lc1,5},
                        {lists,flatmap,2},
                        {erl_eval,eval_lc,6},
                        {shell,exprs,6},
                        {shell,eval_loop,3}]} **

=ERROR REPORT==== 23-Jan-2008::22:10:11 ===
Error in process <0.30.0> with exit value: {data_error,[{zlib,call,3},{zlib,unzip,1},{erl_eval,do_apply,5},{erl_eval,eval_lc1,5},{lists,flatmap,2},{erl_eval,eval_lc,6},{shell,exprs,6},{shell,eval_loop,3}]}



More information about the erlang-bugs mailing list