Segfault for a simple HelloWorld
Boehm, Hans
hboehm@exch.hpl.hp.com
Wed Dec 8 09:07:00 GMT 1999
You're almost certainly running an X86 Linux kernel that does not
put the base of the user stack at the standard location. This happens
if you build the kernel for more than 1 GB of physical memory. It
appears that at least Mandrake 6.1 uses such a kernel by default.
There are two possible fixes:
1. Use a very recent GC version, which reads the stack base from /proc.
2. In the LINUX/I386 section of gcconfig.h (maybe still called config.h
in this version), arrange for STACKBOTTOM to be undefined and HEURISTIC1
to be defined.
Hans
-----Original Message-----
From: Vlad Petric [ mailto:vlad@akela.ro ]
Sent: Wednesday, December 08, 1999 8:10 AM
To: java-discuss@sourceware.cygnus.com
Subject: Segfault for a simple HelloWorld
This is what I get after compiling and running a HelloWorld: (the
CLASSPATH is not set)
#0 GC_push_all_stack (bottom=0x7ffffadc "\fûÿ177円ÃÂ¥202円ÃÂ
*ÃÂúÿ177円",
top=0xc0000000 <Address 0xc0000000 out of bounds>)
at ../../../libgcj-2.95.1/boehm-gc/mark.c:805
#1 0x2ac582a5 in GC_push_roots (all=1)
at ../../../libgcj-2.95.1/boehm-gc/mark_rts.c:453
#2 0x2ac56b2c in GC_mark_some () at
../../../libgcj-2.95.1/boehm-gc/mark.c:271
#3 0x2ac52ed8 in GC_stopped_mark (stop_func=0x2ac52a80
<GC_never_stop_func>)
at ../../../libgcj-2.95.1/boehm-gc/alloc.c:396
#4 0x2ac52da3 in GC_try_to_collect_inner (
stop_func=0x2ac52a80 <GC_never_stop_func>)
at ../../../libgcj-2.95.1/boehm-gc/alloc.c:290
#5 0x2ac5888e in GC_init_inner ()
at ../../../libgcj-2.95.1/boehm-gc/misc.c:545
#6 0x2ac55e58 in GC_generic_malloc_inner (lb=10, k=0)
at ../../../libgcj-2.95.1/boehm-gc/malloc.c:61
#7 0x2ac55f9d in GC_generic_malloc (lb=10, k=0)
at ../../../libgcj-2.95.1/boehm-gc/malloc.c:121
#8 0x2abb5160 in _Jv_AllocBytes (size=10)
at ../../../libgcj-2.95.1/libjava/boehm.cc:248
#9 0x2ab39c36 in _Jv_makeUtf8Const (s=0x2abd4d4e "()V", len=3)
at ../../../libgcj-2.95.1/libjava/prims.cc:172
#10 0x2aba118e in __static_initialization_and_destruction_0
(__initialize_p=1,
__priority=65535)
at ../../../libgcj-2.95.1/libjava/java/lang/natClass.cc:58
#11 0x2aba1295 in global constructors keyed to
java::lang::Class::forName ()
at ../../../libgcj-2.95.1/libjava/java/lang/natClass.cc:60
#12 0x2abb7a0a in __do_global_ctors_aux ()
at ../../gcc-2.95.2/gcc/cp/tinfo2.cc:300
#13 0x2ab353ae in _init ()
(gdb)
Vlad Petric
More information about the Java
mailing list