Re: Bug in SosMan's getline_test
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Tue, 11 Sep 2007 16:30:44 -0700
Friar Tuck <nospam@xxxxxxxxxxx> writes:
I believe I have found a bug in Dr Sosman's getline_test program, which
is one of the official newsgroup programs.
There is no such thing as an "official newsgroup program", at
least not in comp.lang.c
(gdb) bt
#0 0x4008febf in getdelim () from /lib/tls/libc.so.6
#1 0x4008d844 in getline () from /lib/tls/libc.so.6
#2 0x080486b2 in verify (file=0x804a008, st=0xbfffee70, special=0) at
getline_test.c:44
#3 0x0804891d in main () at getline_test.c:103
(gdb) f 2
#2 0x080486b2 in verify (file=0x804a008, st=0xbfffee70, special=0) at
getline_test.c:44
44 buff = getline(file);
It seems very unlikely that Eric would have written his code to
call into the "getline" function in the GNU C library, which is
what this backtrace is showing. I think that you did not compile
and link the test program correctly.
GNU lib'c getline and Eric's getline evidently have different
interfaces, judging from the line of source code above.
--
"If I've told you once, I've told you LLONG_MAX times not to
exaggerate."
--Jack Klein
.
- Follow-Ups:
- Re: Bug in SosMan's getline_test
- From: Friar Tuck
- Re: Bug in SosMan's getline_test
- From: Richard Heathfield
- Re: Bug in SosMan's getline_test
- References:
- Bug in SosMan's getline_test
- From: Friar Tuck
- Bug in SosMan's getline_test
- Prev by Date: Re: Sizes of Integer Types
- Next by Date: Re: Sizes of Integer Types
- Previous by thread: Bug in SosMan's getline_test
- Next by thread: Re: Bug in SosMan's getline_test
- Index(es):
Relevant Pages
|