Re: [Question] Segmentation fault

From: Dust (dustlos@hotmail.com)
Date: 04/16/01


Heres some more output of gdb here, i got bored and deleted a few blank
lines so the line numbers are diff. than the previous email.

Core was generated by `circle'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x281a9d3f in strtol () from /usr/lib/libc.so.4
(gdb) back
#0  0x281a9d3f in strtol () from /usr/lib/libc.so.4
#1  0x281a9cee in atoi () from /usr/lib/libc.so.4
#2  0x8049929 in main (argc=3, argv=0xbfbffbec) at comm.c:304
(gdb) frame 2
#2  0x8049929 in main (argc=3, argv=0xbfbffbec) at comm.c:304
304         else if ((port = atoi(argv[pos])) <= 1024) {
(gdb) list
299       if (pos < argc) {
300         if (!isdigit(*argv[pos])) {
301           log("Usage: %s [-c] [-m] [-q] [-r] [-s] [-d pathname] [port
#]\n", argv[0]);
302           exit(1);
303         }
304         else if ((port = atoi(argv[pos])) <= 1024) {
305           log("SYSERR: Illegal port number %d.", port);
306           exit(1);
307         }
308       }
(gdb) print argc
$1 = 3
(gdb) print pos
$2 = 2
(gdb) print argv[pos]
$3 = 0xbfbffcd6 "9991"

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/05/01 PST