Re: Trouble with getbyhostname()
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Mar 2008 16:55:05 +0100
sam.barker0@xxxxxxxxx wrote:
Hi,
I am having trouble with getbyhostname().I works sometimes but on
other occasions it crashes.
IPADDRESS is a string say "192.123.12.1"
(gdb)
Client::SendSocket (this=0xbfa9493c, QuerBuf=@0xbfa948c4,
IPADDRESS=@0xbfa948d4) at Client.cc:141
141 h = gethostbyname(IPADDRESS.c_str());
(gdb)
*** glibc detected *** /home/workspace/DNSResolver1/checkstring:
free(): invalid next size (normal): 0x0804eb38 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7db1d65]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7db5800]
/lib/tls/i686/cmov/libc.so.6(fclose+0x134)[0xb7da06f4]
/lib/tls/i686/cmov/libc.so.6[0xb7e2a73d]
/lib/tls/i686/cmov/libc.so.6(__res_ninit+0x25)[0xb7e2ae65]
/lib/tls/i686/cmov/libc.so.6(__res_maybe_init+0x7b)[0xb7e2c30b]
/lib/tls/i686/cmov/libc.so.6(__nss_hostname_digits_dots+0x2d)
[0xb7e2dcdd]
/lib/tls/i686/cmov/libc.so.6(gethostbyname+0x9a)[0xb7e3227a]
Most likeley gethostbyname is not the cuplrit but something you called before that.
There are a couple of packages that can assist you in discovering who this is, e.g. electric fence.
--
These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html
.
- Follow-Ups:
- Re: Trouble with getbyhostname()
- From: Paul Pluzhnikov
- Re: Trouble with getbyhostname()
- From: sam . barker0
- Re: Trouble with getbyhostname()
- References:
- Trouble with getbyhostname()
- From: sam . barker0
- Trouble with getbyhostname()
- Prev by Date: Trouble with getbyhostname()
- Next by Date: Re: Alternative to glade?
- Previous by thread: Trouble with getbyhostname()
- Next by thread: Re: Trouble with getbyhostname()
- Index(es):
Relevant Pages
|