bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dawrin- why does pinky SIGBUS


From: mwoehlke
Subject: Re: Dawrin- why does pinky SIGBUS
Date: Wed, 27 Sep 2006 10:45:54 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0

(Sigh. I sure wish gdb built (and worked) on Darwin, Apple's version insists on invoking a broken csh that bitches about my modern LS_COLORS.)

Paul Eggert wrote:
mwoehlke <address@hidden> writes:

#0  0x90007260 in strlen ()
#1  0x9000d1d8 in strdup ()
#2  0x0000393c in canon_host_r (host=0xfffffffc <Address 0xfffffffc
out of bounds>, cherror=0x8248) at canon-host.c:74

This suggest that this code in canon-host.c:

  hints.ai_flags = AI_CANONNAME;
  status = getaddrinfo (host, NULL, &hints, &res);
  if (!status)
    {
      retval = strdup (res->ai_canonname);

set status to 0, but res->ai_canonname was NULL.  Can you verify
that this in fact happened?

(gdb)
69        status = getaddrinfo (host, NULL, &hints, &res);
(gdb) step
70        if (!status)
(gdb) print status
$1 = 0
(gdb) print *res
$2 = {
  ai_flags = 0,
  ai_family = 2,
  ai_socktype = 2,
  ai_protocol = 17,
  ai_addrlen = 16,
  ai_canonname = 0x0,
  ai_addr = 0x30b720,
  ai_next = 0x3009e0
}
(gdb)

Yup, that's what happened. getaddrinfo() broken?

Are you using the system getaddrinfo, or the one shipped with
coreutils?

Um... no idea? I un-tar'd, did './configure --prefix=<dir on an NFS mount>' and 'make'. So I'm using whatever that picks up? If it means anything, when I 'step'd in gdb at the getaddrinfo call, it stepped over rather than into (not that I entirely trust gdb 5.3 with Apple patches).

That said, given the address when I set a breakpoint there, I am guessing it is the system getaddrinfo?
(gdb) break getaddrinfo
Breakpoint 1 at 0x9005492c
(gdb) run
Starting program: /home/install/gnu/alpha/src/coreutils-6.3/src/pinky
Reading symbols for shared libraries +.. done
Reading symbols for shared libraries . done
[snip]
Reading symbols for shared libraries . done
Login    Name                 TTY      Idle   When         Where

Breakpoint 1, 0x9005492c in getaddrinfo ()
(gdb) bt
#0  0x9005492c in getaddrinfo ()
#1  0x00002bd8 in print_entry (utmp_ent=0xbffff8c0) at pinky.c:305
#2  0x00002bd8 in print_entry (utmp_ent=0x18013b0) at pinky.c:305
#3 0x0000320c in scan_entries (n=2, utmp_buf=0x18013b0, argc_names=0, argv_names=0xbffffb08) at pinky.c:476 #4 0x000032a4 in short_pinky (filename=0x796c "/var/run/utmp", argc_names=25170864, argv_names=0xbffffb08) at pinky.c:494
#5  0x00003684 in main (argc=1, argv=0xbffffb04) at pinky.c:622
(gdb)

Honestly I have never used pinky so I don't really care.

It's a sign of problems in the library, though.  It should
get fixed.

Clearly you talked me into it. :-)

--
Matthew
The hippo made me do it! What? What do you mean you can't see the hippo?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]