This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: SEGV
- To: "'Johannes Zellner'" <johannes at zellner dot org>, java gcc <java at gcc dot gnu dot org>
- Subject: RE: SEGV
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Fri, 21 Sep 2001 14:44:12 -0700
This definitely looks like an initialization problem.
Which platform is this on? How are you linking? I assume this is the CVS
trunk?
You should make sure that you're linking against all the right crt* pieces,
and that the appropriate ones are coming from your current gcj build, and
not from an older gcc version. I don't remember whether there are
constraints on the binutils version.
Hans
> -----Original Message-----
> From: Johannes Zellner [mailto:johannes@zellner.org]
> Sent: Friday, September 21, 2001 2:24 PM
> To: java gcc
> Subject: 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
>