public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "dschepler at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug java/53982] New: gij built for x32 can't run a simple Hello World class Date: Mon, 16 Jul 2012 14:18:00 -0000 [thread overview] Message-ID: <bug-53982-8172@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982 Bug #: 53982 Summary: gij built for x32 can't run a simple Hello World class Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned@gcc.gnu.org ReportedBy: dschepler@gmail.com Built and installed gcc from hjl/x32/gcc-4_7-branch (in a test chroot), after running "git merge origin/branches/gcc-4_7-branch", using ../src/configure --prefix=/usr --with-abi=mx32 --enable-languages=c,c++,java With this configuration, I imported a HelloWorld.class file built outside the chroot (since "gcj -C HelloWorld.java" inside the chroot complains about missing ecj1), and tried running "gij HelloWorld". This gave an error: Exception in thread "main" java.lang.NullPointerException at java.lang.String.charAt(libgcj.so.13) at gnu.gcj.convert.Output_ASCII.write(libgcj.so.13) at java.io.PrintStream.writeChars(libgcj.so.13) at java.io.PrintStream.print(libgcj.so.13) at java.io.PrintStream.println(libgcj.so.13) at HelloWorld.main(HelloWorld.java:3) The Java source is just the prototypical Java hello-world example: public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } } On the other hand, if I compile the .class file into a native executable using "gcj -O2 HelloWorld.class --main=HelloWorld -o ./HelloWorld" then that executable runs just fine. But I'm not entirely convinced gcj-compiled native executables work without problems, either. For example, with ecj compiled from the Debian libecj-java binary package's jar file into native code, I can run gcj -C HelloWorld.java OK in the Debian x32 chroot I'm bootstrapping. But on most source packages of any size, it bails out sooner or later with a heap corruption message ecj1: arena.c:661: heap_trim: Assertion `p->size == (0|0x1)' failed. gcj-4.7: internal compiler error: Aborted (program ecj1)
next reply other threads:[~2012-07-16 14:18 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-16 14:18 dschepler at gmail dot com [this message] 2012-07-16 14:53 ` [Bug java/53982] " hjl.tools at gmail dot com 2012-07-16 15:54 ` dschepler at gmail dot com 2012-07-16 16:05 ` dschepler at gmail dot com 2012-07-16 20:15 ` hjl.tools at gmail dot com 2012-07-18 19:13 ` hjl.tools at gmail dot com 2012-07-18 19:20 ` hjl at gcc dot gnu.org
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=bug-53982-8172@http.gcc.gnu.org/bugzilla/ \ --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).