public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "wmahan at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug java/23617] New: Out of memory when classpath contains jar file with zip-style comment Date: Mon, 29 Aug 2005 04:50:00 -0000 [thread overview] Message-ID: <20050829045025.23617.wmahan@gmail.com> (raw) 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
next reply other threads:[~2005-08-29 4:50 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-08-29 4:50 wmahan at gmail dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050829045025.23617.wmahan@gmail.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=java-prs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).