Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > SIGSEGV

Reply
Thread Tools

SIGSEGV

 
 
Oliver Block
Guest
Posts: n/a
 
      11-11-2006
Hello,

a program causes a segmentation fault and I'd like to know if I interpret
the following gdb output correctly (text continues after output):
************************************************** *************************
#1 *0x4012eb3f in gethostbyname () from /lib/tls/libc.so.6
No symbol table info available.
#2 *0x08049312 in http_send_recv (hostname=0x804a340 "www.oliver-block.eu",
* * request=0x804b030 "GET /checkip.php HTTP/1.0\r\nHost:
www.oliver-block.eu\r\n\r\n") at ddnscli.c:168
* * * * hptr = (struct hostent *) 0x804b068
* * * * sptr = (struct servent *) 0x804b028
* * * * sin = {sin_family = 2, sin_port = 0, sin_addr = {s_addr = 0},
* sin_zero = "\000\000\000\000\000\000\000"}
* * * * s = 134514323
* * * * retval = 45
* * * * n = 0
* * * * buflen = 1024
#3 *0x080498ee in get_ip (qry=0x804b00 at ddnscli.c:323
* * * * tmp = 0x0
* * * * r = 0x804b030 "GET /checkip.php HTTP/1.0\r\nHost:
www.oliver-block.eu\r\n\r\n"
#4 *0x080499fa in main (argc=3, argv=0xbffff1a4) at ddnscli.c:398
* * * * option = 8 '\b'
* * * * q = (struct query *) 0x804b008
(gdb) p sizeof(struct servent)
$1 = 16
************************************************** *********************
When I extract

from #2:
sptr = (struct servent *) 0x804b028

from #4:
r = 0x804b030 "GET /checkip.php HTTP/1.0\r\nHost:
www.oliver-block.eu\r\n\r\n"

as servent has a size of 16 bytes

804b028 + 16 = 804b038

These two variables seem to overlap. Do you agree?

Regards,

Oliver


--
Leben ist mehr als ...
<http://www.nak-nrw.de/index.php?id=71>
 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      11-11-2006
On Sat, 11 Nov 2006 02:37:23 +0100, Oliver Block
<> wrote in comp.lang.c:

> Hello,
>
> a program causes a segmentation fault and I'd like to know if I interpret
> the following gdb output correctly (text continues after output):


Sorry, we speak C here, not debuggers or other tools. Try a one of
the gnu.gcc.* groups, or perhaps one for your particular flavor of
*nix. This is not a language question.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI SIGSEGV on AMD64 rafael@enq.ufrgs.br Java 2 08-08-2006 03:25 PM
ceval.c no such file or dir and SIGSEGV Nancy Python 0 04-05-2006 03:25 PM
SIGSEGV 11* segmentation violation manoj Java 0 06-25-2004 04:47 PM
gdb SIGSEGV Morris Dovey C Programming 3 02-14-2004 11:04 PM
SIGSEGV 11 (*) segmentation violation on AIX 5.1 and Java Frank Java 0 08-05-2003 08:54 PM



Advertisments