public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj
@ 2009-10-18 22:39 yuri at tsoft dot com
2009-10-19 9:08 ` [Bug java/41745] " aph at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: yuri at tsoft dot com @ 2009-10-18 22:39 UTC (permalink / raw)
To: java-prs
I use this command line:
gcj -o ecj --main=org.eclipse.jdt.internal.compiler.batch.Main
/usr/local/share/java/ecj.jar
to compile ecj.jar into native binary ecj.
However, when I try running resulting binary on Hello World Java program it
crashes. Original ecj.jar compiles HelloWorld successfully.
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
--
Summary: Segmentation fault when ecj.jar is run as a binary
compiled by gcj
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yuri at tsoft dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
@ 2009-10-19 9:08 ` aph at gcc dot gnu dot org
2009-10-19 9:23 ` yuri at tsoft dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: aph at gcc dot gnu dot org @ 2009-10-19 9:08 UTC (permalink / raw)
To: java-prs
------- Comment #1 from aph at gcc dot gnu dot org 2009-10-19 09:08 -------
Works for me:
$ gcj -o ecj --main=org.eclipse.jdt.internal.compiler.batch.Main
/usr/share/java/ecj.jar
$ ./ecj HelloWorld.java
$ java HelloWorld
Hello World!
--
aph at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
2009-10-19 9:08 ` [Bug java/41745] " aph at gcc dot gnu dot org
@ 2009-10-19 9:23 ` yuri at tsoft dot com
2009-10-19 10:53 ` rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: yuri at tsoft dot com @ 2009-10-19 9:23 UTC (permalink / raw)
To: java-prs
------- Comment #2 from yuri at tsoft dot com 2009-10-19 09:23 -------
No, it doesn't work for me on FreeBSD-8.0:
/usr/local/gcc/4.4.1-java/bin/gcj -o ecj
--main=org.eclipse.jdt.internal.compiler.batch.Main
/usr/local/share/java/ecj.jar
LD_LIBRARY_PATH=/usr/local/gcc/4.4.1-java/lib ldd ./ecj
./ecj:
libgcc_s.so.1 => /usr/local/gcc/4.4.1-java/lib/libgcc_s.so.1
(0x341ba000)
libgcj.so.10 => /usr/local/gcc/4.4.1-java/lib/libgcj.so.10 (0x341c6000)
libm.so.5 => /lib/libm.so.5 (0x363d9000)
libthr.so.3 => /lib/libthr.so.3 (0x363f3000)
librt.so.1 => /usr/lib/librt.so.1 (0x36408000)
libc.so.7 => /lib/libc.so.7 (0x3640d000)
LD_LIBRARY_PATH=/usr/local/gcc/4.4.1-java/lib ./ecj HelloWorld.java
Segmentation fault: 11
backtrace:
#0 0x364041c7 in __error () from /lib/libthr.so.3
#1 0x36403da8 in __error () from /lib/libthr.so.3
#2 0x36606820 in ?? ()
#3 0x00000008 in ?? ()
#4 0x00000001 in ?? ()
#5 0x36606800 in ?? ()
#6 0x00000000 in ?? ()
#7 0xbf9fedd4 in ?? ()
#8 0x363fe1a5 in pthread_rwlock_unlock () from /lib/libthr.so.3
#9 0x36401fae in pthread_cond_signal () from /lib/libthr.so.3
#10 0x34d217e8 in _Jv_CondWait (cv=0x3639778c, mu=0x36397780, millis=0,
nanos=0) at ../../../gcc-4.4.1/libjava/posix-threads.cc:212
#11 0x8c34d070 in ?? ()
#12 0x3639778c in _ZL5mutex () from /usr/local/gcc/4.4.1-java/lib/libgcj.so.10
#13 0x36397780 in E () from /usr/local/gcc/4.4.1-java/lib/libgcj.so.10
#14 0x00000000 in ?? ()
#15 0x00000000 in ?? ()
#16 0x00000000 in ?? ()
#17 0x00000001 in ?? ()
#18 0x341795a8 in dladdr () from /libexec/ld-elf.so.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
2009-10-19 9:08 ` [Bug java/41745] " aph at gcc dot gnu dot org
2009-10-19 9:23 ` yuri at tsoft dot com
@ 2009-10-19 10:53 ` rguenth at gcc dot gnu dot org
2009-10-19 17:20 ` yuri at tsoft dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-19 10:53 UTC (permalink / raw)
To: java-prs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-10-19 10:53 -------
Sounds more like a BSD threads issue, so you need to debug it more.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC host triplet| |freebsd-8.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (2 preceding siblings ...)
2009-10-19 10:53 ` rguenth at gcc dot gnu dot org
@ 2009-10-19 17:20 ` yuri at tsoft dot com
2009-10-19 19:12 ` yuri at tsoft dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: yuri at tsoft dot com @ 2009-10-19 17:20 UTC (permalink / raw)
To: java-prs
------- Comment #4 from yuri at tsoft dot com 2009-10-19 17:20 -------
I confirm this on FreeBSD-8.0 for gcc-4.5.0.20091001.
I notified the maintainer of FreeBSD gcc port.
But once the fix will be found it should go into gcj itself, not into port.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (3 preceding siblings ...)
2009-10-19 17:20 ` yuri at tsoft dot com
@ 2009-10-19 19:12 ` yuri at tsoft dot com
2010-01-03 13:10 ` gerald at pfeifer dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: yuri at tsoft dot com @ 2009-10-19 19:12 UTC (permalink / raw)
To: java-prs
------- Comment #5 from yuri at tsoft dot com 2009-10-19 19:12 -------
How to run testsuite for gcj?
When I run 'gmake check-gcc' from the build directory it doesn't run gcj tests
at all, and gcc/g++ tests summaries are all empty. Not sure what that means.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (4 preceding siblings ...)
2009-10-19 19:12 ` yuri at tsoft dot com
@ 2010-01-03 13:10 ` gerald at pfeifer dot com
2010-01-03 19:38 ` andreast at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gerald at pfeifer dot com @ 2010-01-03 13:10 UTC (permalink / raw)
To: java-prs
------- Comment #6 from gerald at pfeifer dot com 2010-01-03 13:10 -------
Would you mind trying again with the latest snapshot/SVN version of GCC
(or the current version of lang/gcc45, if you prefer)?
There have been some improvements recently to libffi which may make a
difference. (It does look like a threading issue, but who knows...)
Greg, this may be similar/related to what you have been seeing?
--
gerald at pfeifer dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet| |glarkin@FreeBSD.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (5 preceding siblings ...)
2010-01-03 13:10 ` gerald at pfeifer dot com
@ 2010-01-03 19:38 ` andreast at gcc dot gnu dot org
2010-01-04 23:57 ` yuri at rawbw dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: andreast at gcc dot gnu dot org @ 2010-01-03 19:38 UTC (permalink / raw)
To: java-prs
------- Comment #7 from andreast at gcc dot gnu dot org 2010-01-03 19:38 -------
[tc:~] andreast% /usr/local/bin/gcj45 -o ecj
--main=org.eclipse.jdt.internal.compiler.batch.Main ecj.jar
[tc:~] andreast% vi HelloWorld.java
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
[tc:~] andreast% setenv LD_LIBRARY_PATH /usr/local/lib/gcc45
[tc:~] andreast% ./ecj HelloWorld.java
[tc:~] andreast% gij45 HelloWorld
Hello World!
[tc:~] andreast% uname -ra
FreeBSD tc.andreas.nets 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r201405M: Sat Jan 2
22:32:53 CET 2010
andreast@tc.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/TC i386
[tc:~] andreast% gcj45 -v
Using built-in specs.
Reading specs from
/usr/local/lib/gcc45/gcc/i386-portbld-freebsd9.0/4.5.0/../../../libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
COLLECT_GCC=gcj45
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc45/gcc/i386-portbld-freebsd9.0/4.5.0/lto-wrapper
Target: i386-portbld-freebsd9.0
Configured with: ./../gcc-4.5-20091231/configure --disable-nls
--libdir=/usr/local/lib/gcc45 --libexecdir=/usr/local/libexec/gcc45
--program-suffix=45 --with-as=/usr/local/bin/as --with-gmp=/usr/local
--with-gxx-include-dir=/usr/local/lib/gcc45/include/c++/
--with-libiconv-prefix=/usr/local --with-system-zlib --disable-rpath
--prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc45
--build=i386-portbld-freebsd9.0
Thread model: posix
gcc version 4.5.0 20091231 (experimental) (GCC)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (6 preceding siblings ...)
2010-01-03 19:38 ` andreast at gcc dot gnu dot org
@ 2010-01-04 23:57 ` yuri at rawbw dot com
2010-01-09 20:14 ` gerald at pfeifer dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: yuri at rawbw dot com @ 2010-01-04 23:57 UTC (permalink / raw)
To: java-prs
------- Comment #8 from yuri at rawbw dot com 2010-01-04 23:57 -------
Subject: Re: Segmentation fault when ecj.jar is run as a
binary compiled by gcj
gerald at pfeifer dot com wrote:
> ------- Comment #6 from gerald at pfeifer dot com 2010-01-03 13:10 -------
> Would you mind trying again with the latest snapshot/SVN version of GCC
> (or the current version of lang/gcc45, if you prefer)?
>
I tried lang/gcc45 and the problem is gone.
Thank you,
Yuri
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (7 preceding siblings ...)
2010-01-04 23:57 ` yuri at rawbw dot com
@ 2010-01-09 20:14 ` gerald at pfeifer dot com
2010-01-09 20:24 ` andreast at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gerald at pfeifer dot com @ 2010-01-09 20:14 UTC (permalink / raw)
To: java-prs
------- Comment #9 from gerald at pfeifer dot com 2010-01-09 20:14 -------
Excellent, thanks for the confirmation that this is fixed for GCC 4.5,
Yuri.
Andreas, would it make sense to bring your libffi fixes for FreeBSD to
GCC 4.4 as well? Would you mind doing this? (Feel free to mark this
as resolved, which it is for 4.5 at least.) Thanks!
--
gerald at pfeifer dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |andreast at gcc dot gnu dot
|dot org |org
Status|WAITING |UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (8 preceding siblings ...)
2010-01-09 20:14 ` gerald at pfeifer dot com
@ 2010-01-09 20:24 ` andreast at gcc dot gnu dot org
2010-01-10 14:57 ` andreast at gcc dot gnu dot org
2010-01-11 8:36 ` gerald at pfeifer dot com
11 siblings, 0 replies; 13+ messages in thread
From: andreast at gcc dot gnu dot org @ 2010-01-09 20:24 UTC (permalink / raw)
To: java-prs
------- Comment #10 from andreast at gcc dot gnu dot org 2010-01-09 20:24 -------
Hmmm, I need to find out first which of the many patches did solve the issue.
After identifying I might do that.
Let me start with a gcc44 build on my fbsd i386 box.
--
andreast at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-01-09 20:24:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (9 preceding siblings ...)
2010-01-09 20:24 ` andreast at gcc dot gnu dot org
@ 2010-01-10 14:57 ` andreast at gcc dot gnu dot org
2010-01-11 8:36 ` gerald at pfeifer dot com
11 siblings, 0 replies; 13+ messages in thread
From: andreast at gcc dot gnu dot org @ 2010-01-10 14:57 UTC (permalink / raw)
To: java-prs
------- Comment #11 from andreast at gcc dot gnu dot org 2010-01-10 14:57 -------
A plain gcc44 install does also work here. No patches needed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/41745] Segmentation fault when ecj.jar is run as a binary compiled by gcj
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
` (10 preceding siblings ...)
2010-01-10 14:57 ` andreast at gcc dot gnu dot org
@ 2010-01-11 8:36 ` gerald at pfeifer dot com
11 siblings, 0 replies; 13+ messages in thread
From: gerald at pfeifer dot com @ 2010-01-11 8:36 UTC (permalink / raw)
To: java-prs
------- Comment #12 from gerald at pfeifer dot com 2010-01-11 08:36 -------
Closing per previous comment.
Yuri, is it possible a different (older) run-time library was picked
up during your original tests?
--
gerald at pfeifer dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41745
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-01-11 8:36 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-18 22:39 [Bug java/41745] New: Segmentation fault when ecj.jar is run as a binary compiled by gcj yuri at tsoft dot com
2009-10-19 9:08 ` [Bug java/41745] " aph at gcc dot gnu dot org
2009-10-19 9:23 ` yuri at tsoft dot com
2009-10-19 10:53 ` rguenth at gcc dot gnu dot org
2009-10-19 17:20 ` yuri at tsoft dot com
2009-10-19 19:12 ` yuri at tsoft dot com
2010-01-03 13:10 ` gerald at pfeifer dot com
2010-01-03 19:38 ` andreast at gcc dot gnu dot org
2010-01-04 23:57 ` yuri at rawbw dot com
2010-01-09 20:14 ` gerald at pfeifer dot com
2010-01-09 20:24 ` andreast at gcc dot gnu dot org
2010-01-10 14:57 ` andreast at gcc dot gnu dot org
2010-01-11 8:36 ` gerald at pfeifer 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).