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]

Re: SEGV


On Fri, Sep 21, 2001 at 02:04:21PM -0700, Boehm, Hans wrote:
> > Starting program: /home/joze/test
> > 
> > Breakpoint 1, GC_gcj_malloc (lb=34, 
> > ptr_to_struct_containing_descr=0x8144e74) at 
> > ../../../gcc/boehm-gc/gcj_mlc.c:117
> > 117         if( EXPECT(SMALL_OBJ(lb), 1) ) {
> > (gdb) n
> > 119               lw = GC_size_map[lb];
> > (gdb) n
> > 123             opp = &(GC_gcjobjfreelist[lw]);
> > (gdb) p opp
> > $1 = (ptr_t *) 0x0
> > (gdb) p lw
> > $2 = 10
> > (gdb) p
> > $3 = 10
> > </gdb>
> >  
> > 
> >    here again a NULL pointer is dereferenced.
> > 
> This looks insconsistent to me.  Since lw is 10, I find it hard to believe
> that
> &(GC_gcjobjfreelist[lw]) is 0.  Probably gdb is not qute telling the truth
> here.  What's GC_gcjobjfreelist?
> 
> What platform is this on?  If I had to make a wild guess, I'd say that
> somehow some of the Java initialization/class registration code is not
> running correctly or soon enough.  This changed recently (the jcr section
> stuff) and was for a while broken on some platforms.
> 
> I'd be a lot more confident that my wild guess is correct if
> GC_gcjobjfreelist is 0.

correct. It's 0x0:

Breakpoint 1, GC_gcj_malloc (lb=34,
ptr_to_struct_containing_descr=0x8144e74) at
../../../gcc/boehm-gc/gcj_mlc.c:117
117         if( EXPECT(SMALL_OBJ(lb), 1) ) {
(gdb) n
119               lw = GC_size_map[lb];
(gdb) p GC_gcjobjfreelist
$1 = (ptr_t *) 0x0
(gdb) p lw
$2 = 1474
(gdb) n
123             opp = &(GC_gcjobjfreelist[lw]);
(gdb) n
125             op = *opp;
(gdb) p opp
$3 = (ptr_t *) 0x28
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x080fe13b in GC_gcj_malloc (lb=34, ptr_to_struct_containing_descr=0x8144e74) at
../../../gcc/boehm-gc/gcj_mlc.c:125
125             op = *opp;
(gdb) p opp
$4 = (ptr_t *) 0x28
(gdb) p GC_gcjobjfreelist
$5 = (ptr_t *) 0x0
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)

-- 
   Johannes


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