This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
recent java segvs, in exception code
- To: gcc-bugs at gcc dot gnu dot org
- Subject: recent java segvs, in exception code
- From: Tom Tromey <tromey at redhat dot com>
- Date: 03 Apr 2001 12:04:14 -0600
- Cc: Java Discuss List <java at gcc dot gnu dot org>
- Reply-To: tromey at redhat dot com
Today I updated the gcc 3.0 branch and did a complete rebuild from
scratch. I'm using x86 Red Hat Linux 6.2.
Certain programs crash like this:
#0 0x4050455a in next_stack_level (pc=0x40165839, udata=0xbf7ffa7c,
caller_udata=0xbf7ff9fc, saved_regs=0xbf7ff92c)
from /x1/gcc3/build/gcc/libgcc_s.so.0
#1 0x405046aa in throw_helper (eh=0x80c86a0, pc=0x40165839,
my_udata=0xbf7ffb3c, offset_p=0xbf7ffb38)
from /x1/gcc3/build/gcc/libgcc_s.so.0
#2 0x40504a0a in __throw () from /x1/gcc3/build/gcc/libgcc_s.so.0
#3 0x4016583a in _Jv_Throw (value=0x8062e40)
at ../../../gcc/libjava/exception.cc:160
#4 0x4019058b in java.lang.StringBuffer.insert(int, java.lang.String) (
this=0x809dc48, offset=-2, str=0x809ddc8)
at ../../../gcc/libjava/java/lang/StringBuffer.java:432
#5 0x080493b7 in StringBuffer_1.main(java.lang.String[]) ()
at StringBuffer_1.java:54
#6 0x401727db in gnu::gcj::runtime::FirstThread::run() (this=0x8065f00)
at ../../../gcc/libjava/gnu/gcj/runtime/natFirstThread.cc:146
#7 0x4017daeb in java::lang::Thread::run_(java::lang::Object*) (obj=0x8065f00)
at ../../../gcc/libjava/java/lang/natThread.cc:276
#8 0x40292025 in really_start(void*) (x=0x80caff8)
at ../../../gcc/libjava/posix-threads.cc:349
#9 0x4051964c in GC_start_routine (arg=0x807efc0)
at ../../../gcc/boehm-gc/linux_threads.c:633
#10 0x40531b85 in pthread_start_thread (arg=0xbf7ffe40) at manager.c:241
#11 0x4053254c in pthread_start_thread_event (arg=0xbf7ffe40) at manager.c:264
The problem seems to be here:
(gdb) p caller_udata->base_offset
$7 = 135038872
(gdb) p caller_udata->cfa + caller_udata->base_offset
$8 = (void *) 0xc78c837c
(gdb) p *(int*) $
Cannot access memory at address 0xc78c837c
This problem only seems to happen when I run `make
check-target-libjava'. If I copy the failing program (in this case,
StringBuffer_1.java) elsewhere and compile it with the installed
gcj, then it works.
Tom