[erlang-questions] zlib deflate problem
Colm Dougan
colm.dougan@REDACTED
Tue May 20 19:43:43 CEST 2008
On Tue, May 20, 2008 at 3:15 AM, Matthew Dempsky <matthew@REDACTED> wrote:
> On Mon, May 19, 2008 at 10:55 AM, Colm <colm.dougan@REDACTED> wrote:
>> Am I doing something dumb here or is this a bug in the erlang zlib
>> interface? I strongly suspect it is the former.
>
> Your code looks fine to me. Can you try applying the patch below to
> erts/emulator/drivers/common/zlib_drv.c and checks for any
> regressions? (Z_BUF_ERROR is a non-fatal error case for inflate(3);
> it just indicates that zlib wasn't able to make any progress with the
> data given.)
>
> --- zlib_drv.c.orig 2008-05-19 19:09:00.000000000 -0700
> +++ zlib_drv.c 2008-05-19 19:09:12.000000000 -0700
> @@ -257,6 +257,10 @@
> driver_deq(d->port, len);
> return res;
> }
> + if (res == Z_BUF_ERROR) {
> + res = Z_OK;
> + }
> if (res < 0) {
> return res;
> }
Matthew - I tried your patch and it worked. I don't see any
regression but I haven't done extensive testing. If you think this is
the appropriate fix (rather than an exploratory patch) then I can
install the patched erlang on my running system and do more testing.
Thanks,
Colm
More information about the erlang-questions
mailing list