public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/53982] New: gij built for x32 can't run a simple Hello World class
@ 2012-07-16 14:18 dschepler at gmail dot com
2012-07-16 14:53 ` [Bug java/53982] " hjl.tools at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dschepler at gmail dot com @ 2012-07-16 14:18 UTC (permalink / raw)
To: gcc-bugs
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/53982] gij built for x32 can't run a simple Hello World class
2012-07-16 14:18 [Bug java/53982] New: gij built for x32 can't run a simple Hello World class dschepler at gmail dot com
@ 2012-07-16 14:53 ` hjl.tools at gmail dot com
2012-07-16 15:54 ` dschepler at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-16 14:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-07-16
Ever Confirmed|0 |1
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-16 14:53:25 UTC ---
Please show us how to reproduce it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/53982] gij built for x32 can't run a simple Hello World class
2012-07-16 14:18 [Bug java/53982] New: gij built for x32 can't run a simple Hello World class dschepler at gmail dot com
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
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dschepler at gmail dot com @ 2012-07-16 15:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982
--- Comment #2 from Daniel Schepler <dschepler at gmail dot com> 2012-07-16 15:53:41 UTC ---
(In reply to comment #1)
> Please show us how to reproduce it.
I assume you mean the heap corruption issue in ecj1? To pick a Debian package
at random which is running into this... download the source package from
http://ftp.egr.msu.edu/debian/pool/main/libj/libjpedal-jbig2-java/libjpedal-jbig2-java_20100117.orig.tar.gz
and unpack. Then run
gcj -C -Wall `find org -name *.java | LC_COLLATE=C sort`
Here, the output ends with
org/jpedal/jbig2/decoders/MMRDecoder.java:189: warning: The declared exception
IOException is not acecj1: arena.c:661: heap_trim: Assertion `p->size ==
(0|0x1)' failed.
gcj: internal compiler error: Aborted (program ecj1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcj-4.7/README.Bugs> for instructions.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/53982] gij built for x32 can't run a simple Hello World class
2012-07-16 14:18 [Bug java/53982] New: gij built for x32 can't run a simple Hello World class dschepler at gmail dot com
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dschepler at gmail dot com @ 2012-07-16 16:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982
--- Comment #3 from Daniel Schepler <dschepler at gmail dot com> 2012-07-16 16:04:47 UTC ---
Update on comment #2:
Running through the java files one at a time, I found that just
gcj -C -Wall org/jpedal/jbig2/examples/viewer/NavigationToolbar.java
fails by itself. The first time, it creates a bunch of dependent .class files
and outputs warnings for the sources, but subsequent times, I get just
ecj1: arena.c:661: heap_trim: Assertion `p->size == (0|0x1)' failed.
gcj: internal compiler error: Aborted (program ecj1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcj-4.7/README.Bugs> for instructions.
But oddly, that's not 100% reproducible. When I just ran that command 10 times
in a row, it failed 6 times out of the 10.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/53982] gij built for x32 can't run a simple Hello World class
2012-07-16 14:18 [Bug java/53982] New: gij built for x32 can't run a simple Hello World class dschepler at gmail dot com
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-16 20:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2012-07/msg00686.htm
| |l
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-16 20:15:23 UTC ---
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00686.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/53982] gij built for x32 can't run a simple Hello World class
2012-07-16 14:18 [Bug java/53982] New: gij built for x32 can't run a simple Hello World class dschepler at gmail dot com
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-18 19:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-18 19:13:30 UTC ---
Dup.
*** This bug has been marked as a duplicate of bug 53973 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/53982] gij built for x32 can't run a simple Hello World class
2012-07-16 14:18 [Bug java/53982] New: gij built for x32 can't run a simple Hello World class dschepler at gmail dot com
` (4 preceding siblings ...)
2012-07-18 19:13 ` hjl.tools at gmail dot com
@ 2012-07-18 19:20 ` hjl at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2012-07-18 19:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982
--- Comment #6 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2012-07-18 19:19:40 UTC ---
Author: hjl
Date: Wed Jul 18 19:19:34 2012
New Revision: 189626
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189626
Log:
Define FFI_SIZEOF_JAVA_RAW to 4 for x32
PR libffi/53982
PR libffi/53973
* src/x86/ffitarget.h: Check __ILP32__ instead of __LP64__ for
x32.
(FFI_SIZEOF_JAVA_RAW): Defined to 4 for x32.
Modified:
trunk/libffi/ChangeLog.libgcj
trunk/libffi/src/x86/ffitarget.h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-07-18 19:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-16 14:18 [Bug java/53982] New: gij built for x32 can't run a simple Hello World class dschepler at gmail dot com
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
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).