inews segv
Kenichi Okada
okada at opaopa.org
Wed Oct 9 17:11:58 UTC 2002
Hi,
I use inn-CURRENT-20021009.tar.gz on Solaris 9.
inews does not work correctly.
If I set an environment variable "NAME", inews do work correctly.
Why ?
% gdb ./inews
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.9"...
(gdb) run < hoge
Starting program: /home/okada/compile/inn-CURRENT-20021009/frontends/inews < hoge
Program received signal SIGSEGV, Segmentation fault.
0xff132ea8 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xff132ea8 in strlen () from /usr/lib/libc.so.1
#1 0x00014854 in concat (first=0x33188 "news") at concat.c:51
#2 0x0001325c in FormatUserName (pwp=0x33164,
node=0x33e60 "news.media.kyoto-u.ac.jp") at inews.c:495
#3 0x000133b0 in ProcessHeaders (AddOrg=true, linecount=4, pwp=0x33164)
at inews.c:546
#4 0x000141f4 in main (ac=0, av=0x36aa0) at inews.c:1012
(gdb) up
#1 0x00014854 in concat (first=0x33188 "news") at concat.c:51
51 length += strlen(string);
(gdb) list
46 size_t length = 0;
47
48 /* Find the total memory required. */
49 va_start(args, first);
50 for (string = first; string != NULL; VA_NEXT(string, const char *))
51 length += strlen(string);
52 va_end(args);
53 length++;
54
55 /* Create the string. Doing the copy ourselves avoids useless string
(gdb) print string
$1 = 0x33e60 "news.media.kyoto-u.ac.jp"
(gdb) up
#2 0x0001325c in FormatUserName (pwp=0x33164,
node=0x33e60 "news.media.kyoto-u.ac.jp") at inews.c:495
495 buff = concat(pwp->pw_name, "@", node);
(gdb) list
490
491 out = TrimSpaces(outbuff);
492 if (out[0])
493 buff = concat(pwp->pw_name, "@", node, " (", out, ")", (char *) 0);
494 else
495 buff = concat(pwp->pw_name, "@", node);
496 return buff;
497 }
498
499
(gdb) print node
$2 = 0x33e60 "news.media.kyoto-u.ac.jp"
(gdb) print pwp->pw_name
$3 = 0x33188 "news"
--
Kenichi Okada
mailto:okada at opaopa.org
More information about the inn-workers
mailing list