harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Wilson <jessewil...@google.com>
Subject Re: [classlib] Merge of trunk to java6 and zip behaviour change
Date Mon, 12 Oct 2009 06:25:46 GMT
On Sun, Oct 11, 2009 at 3:15 PM, Mark Hindess

> due to the change in "HARMONY-6346 Several archive bugfixes and
> optimizations".
> This test passes on the RI but fails on Harmony as:
>  InflaterOutputStream.write(-1);
> no longer throws a ZipException.  Jesse described this behaviour change
> so this failure is not unexpected but are we happy to just remove this
> test?  Should we record the non-bug difference in a JIRA?

I spent a long time investigating this. I read through the zlib spec plus
some implementation code. I was pretty anxious about being incompatibile
with the JRE, but surprised because I couldn't get raw zlib to detect the
issue. It accepted -1 just fine, failing on the byte that followed. All 3
implementations fail on the 3-byte sequence {-1, -1, -1}.

Since we're compatible with zlib, I don't think there's a problem with
Harmony's implementation. To verify this, create a program (or modify
zpipe.c <http://www.zlib.net/zpipe.c>) to see how zlib behaves when asked to
inflate {-1}.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message