public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
* [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment [not found] <bug-23617-11253@http.gcc.gnu.org/bugzilla/> @ 2005-10-03 14:26 ` tromey at gcc dot gnu dot org 2005-10-24 17:22 ` cvs-commit at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: tromey at gcc dot gnu dot org @ 2005-10-03 14:26 UTC (permalink / raw) To: java-prs ------- Comment #4 from tromey at gcc dot gnu dot org 2005-10-03 14:26 ------- *** Bug 24162 has been marked as a duplicate of this bug. *** -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bflat1 at gmx dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment [not found] <bug-23617-11253@http.gcc.gnu.org/bugzilla/> 2005-10-03 14:26 ` [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment tromey at gcc dot gnu dot org @ 2005-10-24 17:22 ` cvs-commit at gcc dot gnu dot org 2005-11-08 19:10 ` tromey at gcc dot gnu dot org 2005-11-08 19:11 ` tromey at gcc dot gnu dot org 3 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2005-10-24 17:22 UTC (permalink / raw) To: java-prs ------- Comment #5 from cvs-commit at gcc dot gnu dot org 2005-10-24 17:22 ------- Subject: Bug 23617 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: tromey@gcc.gnu.org 2005-10-24 17:22:41 Modified files: gcc/java : ChangeLog zextract.c Log message: 2005-10-24 Wil Mahan <wmahan@gmail.com> PR java/23617 * zextract.c (read_zip_archive): Fix out of memory error when reading jar files with zip-style comments. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1556.2.38&r2=1.1556.2.39 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/zextract.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.19&r2=1.19.34.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment [not found] <bug-23617-11253@http.gcc.gnu.org/bugzilla/> 2005-10-03 14:26 ` [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment tromey at gcc dot gnu dot org 2005-10-24 17:22 ` cvs-commit at gcc dot gnu dot org @ 2005-11-08 19:10 ` tromey at gcc dot gnu dot org 2005-11-08 19:11 ` tromey at gcc dot gnu dot org 3 siblings, 0 replies; 7+ messages in thread From: tromey at gcc dot gnu dot org @ 2005-11-08 19:10 UTC (permalink / raw) To: java-prs ------- Comment #6 from tromey at gcc dot gnu dot org 2005-11-08 19:10 ------- Subject: Bug 23617 Author: tromey Date: Tue Nov 8 19:10:39 2005 New Revision: 106648 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106648 Log: 2005-11-08 Wil Mahan <wmahan@gmail.com> PR java/23617 * zextract.c (read_zip_archive): Fix out of memory error when reading jar files with zip-style comments. Modified: trunk/gcc/java/ChangeLog trunk/gcc/java/zextract.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment [not found] <bug-23617-11253@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2005-11-08 19:10 ` tromey at gcc dot gnu dot org @ 2005-11-08 19:11 ` tromey at gcc dot gnu dot org 3 siblings, 0 replies; 7+ messages in thread From: tromey at gcc dot gnu dot org @ 2005-11-08 19:11 UTC (permalink / raw) To: java-prs ------- Comment #7 from tromey at gcc dot gnu dot org 2005-11-08 19:11 ------- Fix is on 4.0 branch and trunk. -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|--- |4.0.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/23617] New: Out of memory when classpath contains jar file with zip-style comment @ 2005-08-29 4:50 wmahan at gmail dot com 2005-08-29 4:53 ` [Bug java/23617] " wmahan at gmail dot com ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: wmahan at gmail dot com @ 2005-08-29 4:50 UTC (permalink / raw) To: java-prs When trying to compile a file with Debian's gcj 4.0.1-2, I got an error like this: HelloWorld.java:0: error: malformed .zip archive in CLASSPATH: /usr/lib/j2re1.5-sun/lib/ext/localedata.jar/ jc1: out of memory allocating 1342179073 bytes after a total of 389120 bytes It turns out the .jar file the error mentions has a zipfile comment. (JAR is based on the zip format, which allows an variable-length comment at the end of the file.) The compilation was successful when I removed the jar file from the classpath. Here's a simple test case to summarize: with gcj 4.0.1, the Info-ZIP utility, and any class, say HelloWorld.java: $ jar -cf test.jar; gcj -classpath test.jar HelloWorld.java # works fine $ jar -cf test.jar; echo "some comment" | zip -z test.jar; gcj -classpath test.jar HelloWorld.java enter new zip file comment (end with .): jc1: out of memory allocating 1663067502 bytes after a total of 135168 bytes This problem is similar to bug 13020 for FastJar. I came up with a similar solution: modifying zextract.c to check for a zipfile comment, and if necessary scan backwards for the end-central-header signature. Unfortunately I haven't had a chance to test the change compiled into gcc, although it appears to work in a small test program. -- Summary: Out of memory when classpath contains jar file with zip- style comment Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wmahan at gmail dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment 2005-08-29 4:50 [Bug java/23617] New: " wmahan at gmail dot com @ 2005-08-29 4:53 ` wmahan at gmail dot com 2005-08-29 4:56 ` pinskia at gcc dot gnu dot org 2005-08-29 6:02 ` wmahan at gmail dot com 2 siblings, 0 replies; 7+ messages in thread From: wmahan at gmail dot com @ 2005-08-29 4:53 UTC (permalink / raw) To: java-prs ------- Additional Comments From wmahan at gmail dot com 2005-08-29 04:53 ------- Created an attachment (id=9611) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9611&action=view) Possible fix for gcc/java/zextract.c against latest CVS -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment 2005-08-29 4:50 [Bug java/23617] New: " wmahan at gmail dot com 2005-08-29 4:53 ` [Bug java/23617] " wmahan at gmail dot com @ 2005-08-29 4:56 ` pinskia at gcc dot gnu dot org 2005-08-29 6:02 ` wmahan at gmail dot com 2 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-08-29 4:56 UTC (permalink / raw) To: java-prs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-29 04:56 ------- Confirmed, I thought there was already a bug about this (not the fast jar one you pointed out) but looks like there is not. Could you sent your patch to java-patches@ and gcc-patches@ with a changelog and a comment and what this patch does? -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |ice-on-valid-code Last reconfirmed|0000-00-00 00:00:00 |2005-08-29 04:56:23 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment 2005-08-29 4:50 [Bug java/23617] New: " wmahan at gmail dot com 2005-08-29 4:53 ` [Bug java/23617] " wmahan at gmail dot com 2005-08-29 4:56 ` pinskia at gcc dot gnu dot org @ 2005-08-29 6:02 ` wmahan at gmail dot com 2 siblings, 0 replies; 7+ messages in thread From: wmahan at gmail dot com @ 2005-08-29 6:02 UTC (permalink / raw) To: java-prs ------- Additional Comments From wmahan at gmail dot com 2005-08-29 06:02 ------- Done. I expected a bug to already have been reported about this, but I couldn't find one. Thanks for the fast response! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23617 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-11-08 19:11 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-23617-11253@http.gcc.gnu.org/bugzilla/> 2005-10-03 14:26 ` [Bug java/23617] Out of memory when classpath contains jar file with zip-style comment tromey at gcc dot gnu dot org 2005-10-24 17:22 ` cvs-commit at gcc dot gnu dot org 2005-11-08 19:10 ` tromey at gcc dot gnu dot org 2005-11-08 19:11 ` tromey at gcc dot gnu dot org 2005-08-29 4:50 [Bug java/23617] New: " wmahan at gmail dot com 2005-08-29 4:53 ` [Bug java/23617] " wmahan at gmail dot com 2005-08-29 4:56 ` pinskia at gcc dot gnu dot org 2005-08-29 6:02 ` wmahan at gmail dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).