This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Java - allow compiling a compressed .jar/.zip archive


Jeff Sturm <jeff.sturm@appnet.com> writes:

> The dir_ptr array contents are read directly from a zip file.  I am very
> skeptical that this is doing the right thing.  We may have gotten by
> prior to this patch because the size and alignment of ZipDirectory just
> happened to be consistent on all GCC platforms, but introducing a
> pointer to the struct changes that.

You're skeptical - but you actually don't have a reason to believe
there is a bug.  If you look at the code you will find that it actually
does take into account __alignof__(ZipDirectory).  The code is
perhaps excessively clever (I wrote it  about 4 years ago), and could
have a bug, but it is at least *designed* to be robust when bit comes
to field sizes and alignment.

> Are compressed jar files an essential feature for 3.0?

Not essential, but then Java isn't either.  This patch adds valuable
functionality to Java and cannot break non-Java.

> I'm wondering if
> this patch shouldn't be backed out until it can be studied some more.

I disagree.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]