[links-list] Re: [buytenh at gnu.org: elinks 20020302 segfaults on -source]

Mikulas Patocka mikulas at artax.karlin.mff.cuni.cz
Sun May 19 03:09:21 PDT 2002


The fix is this:

Mikulas

On Sun, 19 May 2002, Petr Baudis wrote:

> Dear diary, on Sun, May 19, 2002 at 11:24:17AM CEST, I got a letter,
> where Lennert Buytenhek <buytenh at gnu.org> told me, that...
> > > Could you please show me also the line where it segfaulted?
> >
> > Seems to segfault on the marked line:
> >
> >                 if (ce) {
> >                         struct fragment *frag;
++++++++++		    nextfrag:
> >                         foreach(frag, ce->frag) if (frag->offset <= dump_pos && frag->offset + frag->length > dump_pos) {
> >                                 int l = frag->length - (dump_pos - frag->offset);
> >                                 int w = hard_write(oh, frag->data + dump_pos - frag->offset, l);
> >                                 if (w != l) {
> >                                         detach_connection(stat, dump_pos);
> >                                         if (w < 0) fprintf(stderr, "Error writing to stdout: %s.\n", strerror(errno));
> >                                         else fprintf(stderr, "Can't write to stdout.\n");
> >                                         retval = RET_ERROR;
> >                                         goto terminate;
> >                                 }
> >                                 dump_pos += w;
> >                                 detach_connection(stat, dump_pos);
++++++++++			    goto nextfrag;
> > =====>>>>               }
> > 		}
> >
> >
> > I.e. at the closing of the foreach loop.  At this point, we
> > have:
> >
> > (gdb) print frag
> > $1 = (struct fragment *) 0x8147120
> > (gdb) print *frag
> > Cannot access memory at address 0x8147120
> > (gdb) print &(ce->frag)
> > $2 = (struct list_head *) 0x81067f4
> > (gdb) print ce->frag
> > $3 = {next = 0x81067f4, prev = 0x81067f4}
> > (gdb)
>
> I meant, can you please show me what gdb tells you directly after you attach
> core to links binary, like "caught SIGSEGV there and there\n1234 blablabla()".
> I never saw it would segfault on the end of scope :).
>
> > Any other info I can provide?  I might be able to give you
> > access to the mpeg stream in question (~100kbit), or local
> > shell access perhaps.
>
> Would be great..
>
> --
>
> 				Petr "Pasky" Baudis
>
> * ELinks maintainer                * IPv6 guy (XS26 co-coordinator)
> * IRCnet operator                  * FreeCiv AI hacker
> .
> Object orientation is in the mind, not in the compiler. -- Alan Cox
> .
> Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/
> --
> Unsubscribe: send email to links-list-request at linuxfromscratch.org
> and put unsubscribe in the subject header of the message
>

-- 
Unsubscribe: send email to links-list-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the links-list mailing list