public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/11809] New: trivial hello world compiles, but segfaults
@ 2003-08-05 17:57 owen at email dot arc dot nasa dot gov
2003-08-05 18:23 ` [Bug java/11809] " pinskia at physics dot uc dot edu
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: owen at email dot arc dot nasa dot gov @ 2003-08-05 17:57 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11809
Summary: trivial hello world compiles, but segfaults
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: owen at email dot arc dot nasa dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: gcc 3.3
GCC host triplet: redhat 7.3
I assume that I have something miscompiled, but it works fine under the gcc-3.2
that I installed previously.
% cat hello.java
public class hello {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
% ~/tools/gcc-3.3/bin/gcj --main=hello -g hello.java
% ./a.out
Segmentation fault (core dumped)
% gdb a.out core.7119
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Core was generated by `./a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /home/owen/tools/gcc-3.3/lib/libgcc_s.so.1...done.
Loaded symbols for /home/owen/tools/gcc-3.3/lib/libgcc_s.so.1
Reading symbols from /home/owen/tools/gcc-3.3/lib/libgcj.so.4...done.
Loaded symbols for /home/owen/tools/gcc-3.3/lib/libgcj.so.4
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0 0x00000060 in ?? ()
(gdb) where
#0 0x00000060 in ?? ()
#1 0x40393882 in _Jv_Throw (value=0x808bfa0) at exception.cc:100
#2 0x403a4b65 in java::lang::Class::forName(java::lang::String*, bool,
java::lang::ClassLoader*) (className=0x80978c0, initialize=1 '\001',
loader=0x80acfc0)
at java/lang/natClass.cc:83
#3 0x403a4c2a in java::lang::Class::forName(java::lang::String*) (
className=0x4a415641) at java/lang/natClass.cc:110
#4 0x4036ec0a in gnu.gcj.convert.UnicodeToBytes.getDefaultEncoder() ()
at gnu/gcj/convert/UnicodeToBytes.java:49
#5 0x403e5fac in java.io.PrintStream.PrintStream(java.io.OutputStream, boolean)
(this=0x2, out=0x4a415641) at java/io/PrintStream.java:241
#6 0x403cc3be in java.lang.System.<clinit>() () at java/lang/System.java:135
#7 0x403a6279 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/natClass.cc:814
#8 0x405505bc in _Jv_InitClass (klass=0x4a415641) at java/lang/Class.h:265
#9 0x403cbc98 in java.lang.System.getProperty(java.lang.String) (key=0x1)
at java/lang/System.java:393
#10 0x403cf022 in java.lang.Throwable.<clinit>() ()
at java/lang/Throwable.java:403
#11 0x403a6279 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/natClass.cc:814
#12 0x403a62b5 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/Class.h:265
#13 0x403a62b5 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/Class.h:265
#14 0x403a62b5 in java::lang::Class::initializeClass() (this=0x8049d10)
at java/lang/Class.h:265
#15 0x40386341 in _Jv_AllocObjectNoFinalizer (klass=0x8049d10, size=20)
at java/lang/Class.h:265
#16 0x4038637c in _Jv_AllocObject (klass=0x1, size=1245795905) at prims.cc:415
#17 0x40387213 in _Jv_CreateJavaVM(void*) () at prims.cc:921
#18 0x403873ff in _Jv_RunMain(java::lang::Class*, char const*, int, char
const**, bool) (klass=0x8049ae0, name=0x0, argc=1, argv=0xbfffd6d4, is_jar=false)
at prims.cc:973
#19 0x403875bd in JvRunMain (klass=0x4a415641, argc=1245795905,
argv=0x4a415641) at prims.cc:1011
#20 0x080488f4 in main (argc=1, argv=0xbfffd6d4) at /tmp/cc6SIN37.i:11
#21 0x408671c4 in __libc_start_main () from /lib/libc.so.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/11809] trivial hello world compiles, but segfaults
2003-08-05 17:57 [Bug java/11809] New: trivial hello world compiles, but segfaults owen at email dot arc dot nasa dot gov
@ 2003-08-05 18:23 ` pinskia at physics dot uc dot edu
2003-08-05 18:41 ` owen at email dot arc dot nasa dot gov
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-05 18:23 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11809
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-05 18:23 -------
What binutils are you using, 13.1 is required for i?86-pc-linux-gnu.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/11809] trivial hello world compiles, but segfaults
2003-08-05 17:57 [Bug java/11809] New: trivial hello world compiles, but segfaults owen at email dot arc dot nasa dot gov
2003-08-05 18:23 ` [Bug java/11809] " pinskia at physics dot uc dot edu
@ 2003-08-05 18:41 ` owen at email dot arc dot nasa dot gov
2003-08-05 18:45 ` pinskia at physics dot uc dot edu
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: owen at email dot arc dot nasa dot gov @ 2003-08-05 18:41 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11809
------- Additional Comments From owen at email dot arc dot nasa dot gov 2003-08-05 18:41 -------
Subject: Re: trivial hello world compiles, but segfaults
> What binutils are you using, 13.1 is required for i?86-pc-linux-gnu.
% rpm -q binutils
binutils-2.11.93.0.2-11
I assume that you really mean that I should be using binutils-2.13.1
released in Dec 2002? I'll try to get it installed, but may have
issues since doing installs (especially non-root ones) of bin-utils
can be problematic.
Thanks for the help,
Owen
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/11809] trivial hello world compiles, but segfaults
2003-08-05 17:57 [Bug java/11809] New: trivial hello world compiles, but segfaults owen at email dot arc dot nasa dot gov
2003-08-05 18:23 ` [Bug java/11809] " pinskia at physics dot uc dot edu
2003-08-05 18:41 ` owen at email dot arc dot nasa dot gov
@ 2003-08-05 18:45 ` pinskia at physics dot uc dot edu
2003-08-11 19:15 ` dhazeghi at yahoo dot com
2003-08-11 20:35 ` owen at email dot arc dot nasa dot gov
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-05 18:45 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11809
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WORKSFORME
------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-05 18:45 -------
I install non-root installs of binutils all the time so it cannot be that problematic.
I even use the cvs version of binutils.
Since this works for me, closing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/11809] trivial hello world compiles, but segfaults
2003-08-05 17:57 [Bug java/11809] New: trivial hello world compiles, but segfaults owen at email dot arc dot nasa dot gov
` (2 preceding siblings ...)
2003-08-05 18:45 ` pinskia at physics dot uc dot edu
@ 2003-08-11 19:15 ` dhazeghi at yahoo dot com
2003-08-11 20:35 ` owen at email dot arc dot nasa dot gov
4 siblings, 0 replies; 6+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-11 19:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11809
------- Additional Comments From dhazeghi at yahoo dot com 2003-08-11 19:15 -------
Not strictly relevant, but non-root binutils installs are pretty painless.
Just do ./configure --prefix=$HOME/binutiils; make; make install, and set
path to include $HOME/binutils/bin before /usr/bin, before building gcc.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/11809] trivial hello world compiles, but segfaults
2003-08-05 17:57 [Bug java/11809] New: trivial hello world compiles, but segfaults owen at email dot arc dot nasa dot gov
` (3 preceding siblings ...)
2003-08-11 19:15 ` dhazeghi at yahoo dot com
@ 2003-08-11 20:35 ` owen at email dot arc dot nasa dot gov
4 siblings, 0 replies; 6+ messages in thread
From: owen at email dot arc dot nasa dot gov @ 2003-08-11 20:35 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11809
------- Additional Comments From owen at email dot arc dot nasa dot gov 2003-08-11 20:35 -------
Subject: Re: trivial hello world compiles, but segfaults
Replacing binutils did the job. Sorry for the bother.
Owen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-08-11 20:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05 17:57 [Bug java/11809] New: trivial hello world compiles, but segfaults owen at email dot arc dot nasa dot gov
2003-08-05 18:23 ` [Bug java/11809] " pinskia at physics dot uc dot edu
2003-08-05 18:41 ` owen at email dot arc dot nasa dot gov
2003-08-05 18:45 ` pinskia at physics dot uc dot edu
2003-08-11 19:15 ` dhazeghi at yahoo dot com
2003-08-11 20:35 ` owen at email dot arc dot nasa dot gov
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).