Hello World coredumps
Jeff Sturm
jsturm@sigma6.com
Wed Nov 10 13:47:00 GMT 1999
Under some circumstances a SIGSEGV is normal in boehm-gc code... you
should try "gdb hello core" to get a backtrace.
Before you spend too much time you might consider building from the
source tarball. RH6 is a tested platform and libgcj-2.95.1 will build
out-of-the-box on it.
Jeff
acruise@globalmedia.com wrote:
>
> Okay... I've seen this problem in the archives before, but have yet to
> find a solution:
>
> My system:
>
> Red Hat Linux 6.0 on i686
> Linux 2.2.13 (custom build)
> libstdc++ 2.9.0-12
>
> I know some of you will scream about this, but I'm a little pressed for
> time, so I used the following RPMs from http://rpmfind.net:
>
> binutils-2.9.1.0.25-5mdk.i586.rpm
> gcc-java-2.95-4.i686.rpm
> gcc-2.95-4.i686.rpm
> gcc-libgcj-2.95-4.i686.rpm
> gcc-c++-2.95-4.i686.rpm
> cpp-2.95.1-3.i386.rpm (there was no RPM of cpp-2.95, might this cause
> problems?)
>
> ========
> My boilerplate program:
> ========
> HelloWorld.java:
> public class HelloWorld {
> public static void main( String args[] ) {
> System.out.println( "Hello world!" );
> }
> }
>
> ========
> I run:
> ========
>
> $ unset CLASSPATH
> $ gcj -g --main=HelloWorld HelloWorld.java -o hello
> $ ls -l hello
> -rwxrwxr-x 1 alex alex 18554 Nov 10 13:28 hello
> $ ./hello
> Segmentation fault (core dumped)
>
> ========
> Following earlier instructions from the list archives, I then run:
> ========
>
> $gdb hello
> [blah blah blah...]
> (gdb) run
> Starting program: /home/alex/dev/java/alex/hello
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x2ac5cf02 in GC_push_all_stack ()
> (gdb) bt
> #0 0x2ac5cf02 in GC_push_all_stack ()
> #1 0x2ac5a20a in GC_push_all_stacks ()
> #2 0x2ac5f13f in GC_default_push_other_roots ()
> #3 0x2ac5da2e in GC_push_roots ()
> #4 0x2ac5beb6 in GC_mark_some ()
> #5 0x2ac56b3d in GC_stopped_mark ()
> #6 0x2ac56c03 in GC_try_to_collect_inner ()
> #7 0x2ac5e08a in GC_init_inner ()
> #8 0x2ac5ae50 in GC_generic_malloc_inner ()
> #9 0x2ac5b663 in GC_generic_malloc ()
> #10 0x2abb7c7c in _Jv_AllocBytes ()
> #11 0x2ab3a4d2 in _Jv_makeUtf8Const ()
> #12 0x2aba1f86 in __static_initialization_and_destruction_0 ()
> #13 0x2aba2785 in global constructors keyed to
> java::lang::Class::forName ()
> #14 0x2abbb0ca in __do_global_ctors_aux ()
> #15 0x2ab35d1e in _init ()
> ========
>
> Look familiar? I don't even know where to begin.
>
> TIA,
>
> Alex.
--
Jeff Sturm
jsturm@sigma6.com
More information about the Java
mailing list