> That all looks reasonable.  Unfortunatly, you stopped one short of the
> place amandad is failing :-).  What about version_info[21]?

$1 = 0x2 <Address 0x2 out of bounds> blah

> OK, then try the above first.  If that does not show up as a null
> pointer (which it shouldn't since it's what's causing the failure),
> set a breakpoint at line 130 (set_pname) and print version_info[21].
> If it shows up as a null pointer at that point, step through the code
> with "next" and check it after each statement.  When it goes bad, the
> previous line is the one that clobbered it.

(gdb) break 130
Breakpoint 1 at 0x11abc: file amandad.c, line 130.
(gdb) run
Starting program: /usr/local/libexec/amandad
warning: Lowest section in /usr/lib/libintl.so.1 is .hash at 00000074

Breakpoint 1, main (argc=1, argv=0xffbefc34) at amandad.c:130
130         set_pname("amandad");
(gdb) print version_info[21]
$1 = 0x2 <Address 0x2 out of bounds>

No null pointer, but I went ahead and stepped through the code anyway.

Breakpoint 1 at 0x11abc: file amandad.c, line 130.
(gdb) run
Starting program: /usr/local/libexec/amandad
warning: Lowest section in /usr/lib/libintl.so.1 is .hash at 00000074

Breakpoint 1, main (argc=1, argv=0xffbefc34) at amandad.c:130
130         set_pname("amandad");
132         malloc_size_1 = malloc_inuse(&malloc_hist_1);
134         erroutput_type = (ERR_INTERACTIVE|ERR_SYSLOG);
136         pwname = CLIENT_LOGIN;
137         pwptr = getpwnam(pwname);
142         if(geteuid() == 0) {
163         chdir("/");         /* someplace not world writable */
164         umask(077);
165         dbopen();
168             dup2(db_fd, 1);
169             dup2(db_fd, 2);
172         dbprintf(("%s: version %s\n", argv[0], version()));
173         for(vp = version_info; *vp != NULL; vp++)
174             dbprintf(("%s: %s", argv[0], *vp));

Program received signal SIGSEGV, Segmentation fault.
0xff0b6e94 in strlen () from /usr/lib/libc.so.1

> John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

thanks,
-Ben

Reply via email to