This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Freeze in GC_suspend_handler


What's field -> u.addr or *field when the dereference segfaults?  Can you get gdb to print that?

It might help if Tom looked at this as well.  This code is tracing through a Java class object, and apparently something is in an unexpected state.

Hans

> -----Original Message-----
> From: Daniel Bonniot [mailto:Daniel.Bonniot@inria.fr]
> Sent: Tuesday, June 11, 2002 2:44 PM
> To: Boehm, Hans
> Cc: java@gcc.gnu.org
> Subject: Re: Freeze in GC_suspend_handler
> 
> 
> >
> >
> >Is this from a clean build of the gcc 3.1 release tree?  It 
> would would be nice to understand exactly where and why 
> _Jv_MarkObj is failing.
> >
> 
> I built the last snapshot (gcc version 3.1.1 20020603 
> (prerelease)) from 
> source, to have debugging symbols and a known source tree. 
> The same SEGV 
> occurs, inside the GC, but interestingly at a different entry 
> point from 
> my program. One thing that looks suspicious in the stack trace is the 
> call to _Jv_AllocBytes(int) with parameter (size=0).
> 
> The SEGV occurs at gcc/libjava/boehm.cc:193
> I suppose you can browse this file, from that version. Here is the 
> context, finishing with the offending line:
> // For the interpreter, we also need to mark the memory
> // containing static members
> if ((field->flags & java::lang::reflect::Modifier::STATIC))
> {
> p = (ptr_t) field->u.addr;
> MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c8clabel);
> 
> // also, if the static member is a reference,
> // mark also the value pointed to. We check for isResolved
> // since marking can happen before memory is allocated for
> // static members.
> if (JvFieldIsRef (field) && field->isResolved())
> {
> jobject val = *(jobject*) field->u.addr;
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]