Hi:
I'm using the getaddrinfo call and getting a SIGSEGV. The code snippet is below.
===============
struct addrinfo hints;
struct addrinfo *result = 0;
int s;
memset(&hints,0,sizeof(struct addrinfo));
hints.ai_family = PF_UNSPEC;
if((s=getaddrinfo("server_2",NULL,&hints,&result))!=0) {
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(s));
}
===============
The stack trace is
===============
(gdb)
89 if((s=getaddrinfo("server_2",NULL,&hints,&result))!=0) {
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x0089abd4 in __res_vinit () from /lib/tls/i686/libc.so.6
(gdb) bt
#0 0x0089abd4 in __res_vinit () from /lib/tls/i686/libc.so.6
#1 0x0089b66e in __res_ninit () from /lib/tls/i686/libc.so.6
#2 0x0089caac in __res_maybe_init () from /lib/tls/i686/libc.so.6
#3 0x008789ea in gaih_inet () from /lib/tls/i686/libc.so.6
#4 0x008798d8 in getaddrinfo () from /lib/tls/i686/libc.so.6
#5 0x08333c1b in CicAgent::init (this=0x969e1e8) at ../src/reliability/linux/cic_agent.cxx:89
#6 0x0831e9d2 in CicDObj:

rocessConfigRequest (this=0x969dac8, pRec=0x969e360)
at ../src/reliability/common/cic_dobj.cxx:129
#7 0x0831e884 in CicDObj:

rocess (this=0x969dac8, pRec=0x969e360)
at ../src/reliability/common/cic_dobj.cxx:101
#8 0x0831ed87 in executeRequest (pObject=0x969dac8, pArg=0x969e360)
at ../src/reliability/common/cic_dobj.cxx:200
#9 0x081de851 in CLWorkerThread::run (this=0x969dff0)
at ../src/framework/cl_worker_thread.cxx:83
#10 0x080d0ef4 in thread_start (arg=0x969dff0) at ../src/linux/cl_basic_thread.cxx:116
#11 0x00b2b080 in start_thread () from /lib/tls/i686/libpthread.so.0
#12 0x0088e23e in clone () from /lib/tls/i686/libc.so.6
(gdb)
===============
My kernel is redhat enterprise "Linux 2.6.9-42.5610".
I am using gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
Is there any known issue with this call with the above combination of Linux kernel and gcc library?
Thanks,
Amit.