473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

SIGSEGV

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=0x804b008) 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>
Nov 11 '06 #1
1 1731
On Sat, 11 Nov 2006 02:37:23 +0100, Oliver Block
<ne********@block-online.euwrote 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
Nov 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Morten W. Petersen | last post by:
Hi, I have a website that's built with PHP and MySQL and it works just fine, most of the time. However, when the load gets higher (say 3 hits per second), Apache starts to exit with SIGSEGV on...
0
by: Dieter Maurer | last post by:
Python 2.3.3, Linux 2.4.x: It looks as if a SIGSEGV in a thread of a multi threaded application does not kill the complete process under some circumstances but only one thread (unrelated to the...
0
by: Paffko | last post by:
What are the possibilities of getting SIGBUS and SIGSEGV errors in the following scenario? There is a program (C/C++/Pro*C) that was running fine under HP-UX 11.x and Oracle8i (8.1.6). Oracle...
7
by: USUN_TO | last post by:
Hi, i got problem when i bind in this way: local_addr.sin_family = AF_INET; local_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); local_addr.sin_port = htons(CLIENT_PORT); i can easly bind...
4
by: junky_fellow | last post by:
what is the difference between signals SIGBUS and SIGSEGV ? when does an application program receive SIGBUS and in which cases SIGSEGV ? thanx in advance for any help ...
13
by: vashwath | last post by:
Hi all, In my current project I am using signals for error handling. Since I cannot show full code, I have just shown important piece of code which is relevant. void sigsegenv() {...
0
by: Nancy | last post by:
Hi, I'm running 2.4 Python. I have an extension program that calls C funcs. Actually I have a C prog that calls python that calls C. In a python to C function call I get a SIGSEGV and this stack...
4
by: subirs | last post by:
Hi, I am encountering SIGSEGV if I am opeing and closing a file in a do-while loop. i am including the part of the code where I have used fscanf....
5
by: Joakim Hove | last post by:
Hello, in my application I have a typedefed struct: typedef struct { double d1; int i1; /* I have simplified the object here. */ } data_ptr_type;
1
by: krazedkid | last post by:
I am trying to get my code to handle SIGSEGV multiple times, it will handle one of them but then nothing else. void sigHandler( int signum ) { if ( signum == SIGSEGV ) { printf("got a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.