public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: gcj segmentation fault
@ 2003-10-22 21:46 Giovanni Visciano
  0 siblings, 0 replies; 9+ messages in thread
From: Giovanni Visciano @ 2003-10-22 21:46 UTC (permalink / raw)
  To: tromey; +Cc: Andrew Haley, Andrew Pinski, gcc

>-- Messaggio originale --
>From: Andrew Haley <aph@redhat.com>
>Date: Wed, 22 Oct 2003 19:46:59 +0100
>To: Jeff Sturm <jsturm@one-point.com>
>Cc: Andrew Pinski <apinski@apple.com>,
>   Giovanni Visciano <giovannivisciano@virgilio.it>, <tromey@redhat.com>,
>   <gcc@sources.redhat.com>
>Subject: Re: gcj segmentation fault
>
>
>
>Jeff Sturm writes:
> > On Wed, 22 Oct 2003, Andrew Pinski wrote:
> > > > my binutils:
> > > > binutils       2.12.90.0.1-4
> > >
> > >  From <http://gcc.gnu.org/install/specific.html#ix86-*-linux*>:
> > > As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
> > > See bug 10877 for more information.
> >
> > The backtrace doesn't look right for 10877, which is related to
> > relocations, not EH.
>
>Yeah, but one truly evil binutils bug *is* related to EH.
>
>http://sources.redhat.com/ml/binutils/2003-02/msg00352.html
>http://sources.redhat.com/ml/binutils/2003-02/msg00471.html
>
>Andrew.

with binutils 2.13.90, it works
thanks Giovanni


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcj segmentation fault
  2003-10-22 19:23           ` Jeff Sturm
@ 2003-10-22 20:04             ` Andrew Haley
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Haley @ 2003-10-22 20:04 UTC (permalink / raw)
  To: Jeff Sturm; +Cc: Andrew Pinski, Giovanni Visciano, tromey, gcc


Jeff Sturm writes:
 > On Wed, 22 Oct 2003, Andrew Pinski wrote:
 > > > my binutils:
 > > > binutils       2.12.90.0.1-4
 > >
 > >  From <http://gcc.gnu.org/install/specific.html#ix86-*-linux*>:
 > > As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
 > > See bug 10877 for more information.
 > 
 > The backtrace doesn't look right for 10877, which is related to
 > relocations, not EH.

Yeah, but one truly evil binutils bug *is* related to EH.

http://sources.redhat.com/ml/binutils/2003-02/msg00352.html
http://sources.redhat.com/ml/binutils/2003-02/msg00471.html

Andrew.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcj segmentation fault
  2003-10-22 18:56         ` Andrew Pinski
@ 2003-10-22 19:23           ` Jeff Sturm
  2003-10-22 20:04             ` Andrew Haley
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Sturm @ 2003-10-22 19:23 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Giovanni Visciano, tromey, gcc

On Wed, 22 Oct 2003, Andrew Pinski wrote:
> > my binutils:
> > binutils       2.12.90.0.1-4
>
>  From <http://gcc.gnu.org/install/specific.html#ix86-*-linux*>:
> As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
> See bug 10877 for more information.

The backtrace doesn't look right for 10877, which is related to
relocations, not EH.  And only manifests at -O3.

Regardless, the OP should definitely upgrade binutils and see if the
problem goes away.

Jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcj segmentation fault
  2003-10-22 18:49       ` Giovanni Visciano
@ 2003-10-22 18:56         ` Andrew Pinski
  2003-10-22 19:23           ` Jeff Sturm
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Pinski @ 2003-10-22 18:56 UTC (permalink / raw)
  To: Giovanni Visciano; +Cc: Andrew Pinski, tromey, gcc

> my binutils:
> binutils       2.12.90.0.1-4

 From <http://gcc.gnu.org/install/specific.html#ix86-*-linux*>:
As of GCC 3.3, binutils 2.13.1 or later is required for this platform. 
See bug 10877 for more information.

The bug (in binutils) also happens when using libgcj so that is what 
you are seeing.


Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcj segmentation fault
  2003-10-22 18:31     ` Tom Tromey
@ 2003-10-22 18:49       ` Giovanni Visciano
  2003-10-22 18:56         ` Andrew Pinski
  0 siblings, 1 reply; 9+ messages in thread
From: Giovanni Visciano @ 2003-10-22 18:49 UTC (permalink / raw)
  To: tromey; +Cc: gcc

>Try "bt".  That should tell us something.
>
>I suspect that you have the wrong version of binutils.  We've seen
>crashes in exception handling when ld is too old.  That's just a guess
>though.
>
>Tom

this is the output:

(gdb) bt
#0  0x79730065 in ?? ()
#1  0x40393ba2 in _Jv_Throw (value=0x808bfa0) at exception.cc:100
#2  0x403a3e12 in java::io::FileDescriptor::open(java::lang::String*, int)
() at gcj/cni.h:64
#3  0x403d6590 in java.io.FileDescriptor.FileDescriptor(java.lang.String,
int) (this=0x808bfa0, path=0x4a415641,
    mode=1245795905) at java/io/FileDescriptor.java:60
#4  0x403d66d1 in java.io.FileInputStream.FileInputStream(java.lang.String)
(this=0x80db3f0, name=0x80db400)
    at java/io/FileInputStream.java:35
#5  0x403d672e in java.io.FileInputStream.FileInputStream(java.io.File)
(this=0x4a415641, file=0x4a415641)
    at java/io/FileInputStream.java:39
#6  0x40422964 in gnu.gcj.protocol.file.Connection.connect() (this=0x80d8f90)
    at gnu/gcj/protocol/file/Connection.java:56
#7  0x40484f19 in java.net.JarURLConnection.connect() (this=0x80db3f0) at
java/net/JarURLConnection.java:91
#8  0x40423fd7 in gnu.gcj.protocol.jar.Connection.getJarFile() (this=0x80db3f0)
    at gnu/gcj/protocol/jar/Connection.java:48
#9  0x4048c8a1 in java.net.URLClassLoader$JarURLLoader.URLClassLoader$JarURLLoader(java.net.URLClassLoader,
java.ne          t.URL) (this=0x809ff30, classloader=0x80d8fc0, baseURL=0x808bfa0)
at java/net/URLClassLoader.java:240
#10 0x4048cfc5 in java.net.URLClassLoader.addURL(java.net.URL) (this=0x80d8fc0,
newUrl=0x8095e38)
    at java/net/URLClassLoader.java:760
#11 0x4048d03f in java.net.URLClassLoader.addURLs(java.net.URL[]) (this=0x80d8fc0,
newUrls=0x8095eb0)
    at java/net/URLClassLoader.java:780
#12 0x4048cbc7 in java.net.URLClassLoader.URLClassLoader(java.net.URL[])
(this=0x80d8fc0, urls=0x4a415641)
    at java/net/URLClassLoader.java:658
#13 0x40426658 in gnu.gcj.runtime.VMClassLoader.VMClassLoader() (this=0x4a415641)
    at gnu/gcj/runtime/VMClassLoader.java:20
#14 0x404269a8 in gnu.gcj.runtime.VMClassLoader.__U3c_clinit__U3e_() ()
at gnu/gcj/runtime/VMClassLoader.java:71
#15 0x403a6569 in java::lang::Class::initializeClass() (this=0x40687b00)
at java/lang/natClass.cc:814
#16 0x40550f7c in _Jv_InitClass (klass=0x4a415641) at java/lang/Class.h:265
#17 0x403bd138 in java.lang.ClassLoader.getSystemClassLoader() () at java/lang/ClassLoader.java:203
#18 0x403a4f95 in java::lang::Class::getClassLoader() (this=0x4a415641)
at java/lang/natClass.cc:134
#19 0x403a4f19 in java::lang::Class::forName(java::lang::String*) (className=0x4a415641)
---Type <return> to continue, or q <return> to quit---
    at java/lang/natClass.cc:104
#20 0x4036f0cb in gnu.gcj.convert.UnicodeToBytes.getDefaultEncoder() ()
at gnu/gcj/convert/UnicodeToBytes.java:49
#21 0x403e64fc in java.io.PrintStream.PrintStream(java.io.OutputStream,
boolean) (this=0x80d8fc0, out=0x4a415641)
    at java/io/PrintStream.java:241
#22 0x403cc925 in java.lang.System.__U3c_clinit__U3e_() () at java/lang/System.java:135
#23 0x403a6569 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/natClass.cc:814
#24 0x40550f7c in _Jv_InitClass (klass=0x4a415641) at java/lang/Class.h:265
#25 0x403cc1e8 in java.lang.System.getProperty(java.lang.String) (key=0x1)
at java/lang/System.java:393
#26 0x403cf5a2 in java.lang.Throwable.__U3c_clinit__U3e_() () at java/lang/Throwable.java:403
#27 0x403a6569 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/natClass.cc:814
#28 0x403a65a5 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/Class.h:265
#29 0x403a65a5 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/Class.h:265
#30 0x403a65a5 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/Class.h:265
#31 0x40386961 in _Jv_AllocObjectNoFinalizer (klass=0x8049d10, size=20)
at java/lang/Class.h:265
#32 0x4038699c in _Jv_AllocObject (klass=0x1, size=1245795905) at prims.cc:431
#33 0x40387849 in _Jv_CreateJavaVM(void*) () at prims.cc:937
#34 0x40387a4f in _Jv_RunMain(java::lang::Class*, char const*, int, char
const**, bool) (klass=0x8049ae0,
    name=0x0, argc=1, argv=0xbffff9a4, is_jar=false) at prims.cc:989
#35 0x40387c09 in JvRunMain (klass=0x4a415641, argc=1245795905, argv=0x4a415641)
at prims.cc:1027
#36 0x08048904 in main ()

my binutils:
binutils       2.12.90.0.1-4

thanks Giovanni

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcj segmentation fault
  2003-10-22 17:21   ` Giovanni Visciano
@ 2003-10-22 18:31     ` Tom Tromey
  2003-10-22 18:49       ` Giovanni Visciano
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Tromey @ 2003-10-22 18:31 UTC (permalink / raw)
  To: Giovanni Visciano; +Cc: gcc

>>>>> "Giovanni" == Giovanni Visciano <giovannivisciano@virgilio.it> writes:

Giovanni> (gdb) run
Giovanni> Starting program: /home/gio/Desktop/a.out
Giovanni> [New Thread 1024 (LWP 488)]
Giovanni> Program received signal SIGSEGV, Segmentation fault.
Giovanni> [Switching to Thread 1024 (LWP 488)]
Giovanni> 0x79730065 in ?? ()

Try "bt".  That should tell us something.

I suspect that you have the wrong version of binutils.  We've seen
crashes in exception handling when ld is too old.  That's just a guess
though.

Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcj segmentation fault
  2003-10-21 22:45 ` Jeff Sturm
@ 2003-10-22 17:21   ` Giovanni Visciano
  2003-10-22 18:31     ` Tom Tromey
  0 siblings, 1 reply; 9+ messages in thread
From: Giovanni Visciano @ 2003-10-22 17:21 UTC (permalink / raw)
  To: Jeff Sturm; +Cc: gcc


>On Tue, 21 Oct 2003, Giovanni Visciano wrote:
>> ./configure --prefix=/home/gio/Gcc3.3.2 --program-suffix=-3.3.2
>> make
>> make install
>>
>> added to my PATH /home/gio/Gcc3.3.2/bin,
>> and to LD_LIBRARY_PATH /home/gio/Gcc-3.3.2/lib
>>
>> gcc-3.3.2 woks without problems.
>> gcj-3.3.2 compiles my java programs but when I run them:
>>
>> ex.
>> gcj-3.3.2 --main=HelloWorld HelloWorld.java
>> (a.out created)
>> ./a.out
>> (segmentation fault)
>
>There aren't enough clues in your message to guess what may have gone
>wrong.
>
>Try running "ldd a.out" to verify it is linking to the libgcj.so in
>$prefix/lib.  Try running under gdb to get a stack trace.

Thanks for your reply Jeff; this is the output:

gio@debian:~$ ldd a.out
libgcc_s.so.1 => /home/gio/Gcc-3.3.2/lib/libgcc_s.so.1 (0x40014000)
        libgcj.so.4 => /home/gio/Gcc-3.3.2/lib/libgcj.so.4 (0x4001c000)
        libm.so.6 => /lib/libm.so.6 (0x40805000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40826000)
        libdl.so.2 => /lib/libdl.so.2 (0x4083a000)
        libc.so.6 => /lib/libc.so.6 (0x4083d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

runnig a.out with gdb:

(gdb) run
Starting program: /home/gio/Desktop/a.out
[New Thread 1024 (LWP 488)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 488)]
0x79730065 in ?? ()

Giovanni.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcj segmentation fault
  2003-10-21 22:18 Giovanni Visciano
@ 2003-10-21 22:45 ` Jeff Sturm
  2003-10-22 17:21   ` Giovanni Visciano
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Sturm @ 2003-10-21 22:45 UTC (permalink / raw)
  To: Giovanni Visciano; +Cc: gcc

On Tue, 21 Oct 2003, Giovanni Visciano wrote:
> ./configure --prefix=/home/gio/Gcc3.3.2 --program-suffix=-3.3.2
> make
> make install
>
> added to my PATH /home/gio/Gcc3.3.2/bin,
> and to LD_LIBRARY_PATH /home/gio/Gcc-3.3.2/lib
>
> gcc-3.3.2 woks without problems.
> gcj-3.3.2 compiles my java programs but when I run them:
>
> ex.
> gcj-3.3.2 --main=HelloWorld HelloWorld.java
> (a.out created)
> ./a.out
> (segmentation fault)

There aren't enough clues in your message to guess what may have gone
wrong.

Try running "ldd a.out" to verify it is linking to the libgcj.so in
$prefix/lib.  Try running under gdb to get a stack trace.

Jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* gcj segmentation fault
@ 2003-10-21 22:18 Giovanni Visciano
  2003-10-21 22:45 ` Jeff Sturm
  0 siblings, 1 reply; 9+ messages in thread
From: Giovanni Visciano @ 2003-10-21 22:18 UTC (permalink / raw)
  To: gcc

hi,
I have compiled and installed gcc3.3.2:

./configure --prefix=/home/gio/Gcc3.3.2 --program-suffix=-3.3.2
make
make install

added to my PATH /home/gio/Gcc3.3.2/bin,
and to LD_LIBRARY_PATH /home/gio/Gcc-3.3.2/lib

gcc-3.3.2 woks without problems.
gcj-3.3.2 compiles my java programs but when I run them:

ex.
gcj-3.3.2 --main=HelloWorld HelloWorld.java
(a.out created)
./a.out
(segmentation fault)

no problems with gcc3.2.3.

I am using Debian Woody
thanks Giovanni.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-10-22 19:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-22 21:46 gcj segmentation fault Giovanni Visciano
  -- strict thread matches above, loose matches on Subject: below --
2003-10-21 22:18 Giovanni Visciano
2003-10-21 22:45 ` Jeff Sturm
2003-10-22 17:21   ` Giovanni Visciano
2003-10-22 18:31     ` Tom Tromey
2003-10-22 18:49       ` Giovanni Visciano
2003-10-22 18:56         ` Andrew Pinski
2003-10-22 19:23           ` Jeff Sturm
2003-10-22 20:04             ` Andrew Haley

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).