Debian bug report logs -
#1741, boring messages
Message sent to debian-devel@pixar.com:
Subject: Bug#1741: getservbyport doesn't work
Reply-To: Ian Jackson <ijackson@chiark.chu.cam.ac.uk>, debian-bugs@pixar.com
Resent-From: Ian Jackson <ijackson@chiark.chu.cam.ac.uk>
Resent-To: debian-devel@pixar.com
Resent-Date: Mon, 23 Oct 1995 18:18:03 GMT
Resent-Message-ID: <debian-bugs-handler.1741.B10231815130@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: libc
X-Debian-PR-Keywords:
Received: via spool for debian-bugs; Mon, 23 Oct 1995 18:18:03 GMT
Received: with rfc822 via encapsulated-mail; Mon, 23 Oct 1995 18:15:11 GMT
Received: from pixar.com by mongo.pixar.com with smtp
(Smail3.1.28.1 #15) id m0t7RL9-0002NhC; Mon, 23 Oct 95 11:11 PDT
Received: from artemis.chu.cam.ac.uk by pixar.com with SMTP id AA10126
(5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Mon, 23 Oct 1995 11:10:44 -0700
Received: from chiark.chu.cam.ac.uk by artemis.chu.cam.ac.uk with smtp
(Smail3.1.29.1 #33) id m0t7RKx-0007uaC; Mon, 23 Oct 95 18:11 GMT
Received: by chiark.chu.cam.ac.uk
id m0t7RKn-0002aNC
(Debian /\oo/\ Smail3.1.29.1 #29.33); Mon, 23 Oct 95 18:10 GMT
Message-Id: <m0t7RKn-0002aNC@chiark.chu.cam.ac.uk>
Date: Mon, 23 Oct 95 18:10 GMT
From: Ian Jackson <ijackson@chiark.chu.cam.ac.uk>
To: Debian bugs submission address <debian-bugs@pixar.com>
Package: libc
Version: 4.6.27
chiark:~> cat t.c
#include <netdb.h>
int main(void) {
printf("%s\n",getservbyport(23,"tcp")->s_name);
return 0;
}
chiark:~> gcc t.c
chiark:~> ./a.out
Segmentation fault (core dumped)
chiark:~> gcc -g t.c
chiark:~> gdb a.out
GDB is free software and you are welcome to 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.
GDB 4.14 (i486-debian-linux), Copyright 1995 Free Software Foundation, Inc...
(gdb) print getservbyport(23,"tcp")
You can't do that without a process to debug
(gdb) run
Starting program: /u/ijackson/a.out
Program received signal SIGSEGV, Segmentation fault.
0x109d in main () at t.c:3
3 printf("%s\n",getservbyport(23,"tcp")->s_name);
(gdb) print getservbyport(23,"tcp")
$1 = (struct servent *) 0x0
(gdb)
getservbyport is returning NULL inappropriately, so the test program
dereferences zero and dumps core.
On a SunOS4 machine:
grus:~/junk> ./a.out
telnet
grus:~/junk>
Ian.
Message sent:
From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ian Jackson <ijackson@chiark.chu.cam.ac.uk>
Subject: Bug#1741: Acknowledgement (was: getservbyport doesn't work)
In-Reply-To: <m0t7RKn-0002aNC@chiark.chu.cam.ac.uk>
References: <m0t7RKn-0002aNC@chiark.chu.cam.ac.uk>
Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received. It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.
If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#1741" or "Re: Bug#1741" so that
we can identify it as relating to the same problem.
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.
Ian Jackson
(maintainer, debian-bugs)
Ian Jackson /
iwj10@thor.cam.ac.uk,
with the debian-bugs tracking mechanism