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

Petr Baudis pasky at pasky.ji.cz
Sun May 19 02:33:04 PDT 2002


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;
>                         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);
> =====>>>>               }
> 		}
> 
> 
> 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



More information about the links-list mailing list