(gdb) bt
#0 __libc_calloc (n=18, elem_size=8) at malloc.c:4049
#1 0x0079146c in allocate_dtv (result=<value optimized out>) at dl-
tls.c:300
#2 *__GI__dl_allocate_tls (result=<value optimized out>) at dl-tls.c:
466
#3 0x0094b27e in allocate_stack (stack=<value optimized out>,
pdp=<value optimized out>, attr=<value optimized out>) at
allocatestack.c:561
#4 __pthread_create_2_1 (stack=<value optimized out>, pdp=<value
optimized out>,
attr=<value optimized out>) at pthread_create.c:436
#5 0x0804ad21 in ServFD::Start (this=0x80545e8) at ServFD.cpp:617
pthread_t m_tid;
extern "C" {
inline static void *start_thread(void *args)
{
ServFD * const serv = (ServFD *)(args);
serv->Run();
serv->~ServFD();
return 0;
}
};
This is inside the ServFD::Start() C++ method where 'this' is ServFD:
int ret = pthread_create(&m_tid, NULL, start_thread, this);
Im running on fedora 12, g++ (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)
2GB memory, not running much of anything on machine, top shows
about 1G RAM free, 0 swap used.
Like I said, I know this same code worked before and Im seeing
it fail on 2 machines (both running Fed 12). I dont have a Fed 11
machine to try or I would.
Anyone seen this and know how to fix or work around?
> Anyone seen this and know how to fix or work around?
Can you create a complete self-contained, compilable example that
demonstrates the problem? Most likely, the bug is in code you have not
shown. (And you may want to use tools like 'valgrind' to check for
heap corruption.)
DS
Thanks, I used valgrind and found my error which was a bug
in the previous version and just happened to work all this time.
I didnt initialize the namelen variable in getpeername(). Im such
a proponent of valgrind and I didnt think to use it in this case.
Thanks again