id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 4175,CPLSetErrorHandler causes segmentation fault,rbanfield,warmerdam,"Not every call I make to CPLSetErrorHandler causes a segfault, but in my code I have a place where this call to CPLSetErrorHandler always causes a segmentation fault. Postmortem, It looks like the error function is being called repeatedly until the stack overflows. This looks to be a result of pthread_setspecific() failing. I dont know why it would fail. This does not occur in gdal 1.7.3. I have not tried 1.8.0. Here's the backtrace (first 145485 lines omitted). {{{ #145486 0x00000000005f2df1 in CPLErrorV(CPLErr, int, const char *, typedef __va_list_tag __va_list_tag *) (eErrClass=CE_Fatal, err_no=1, fmt=0xba4d90 ""pthread_setspecific() failed!"", args=0x7fffffffbd20) at cpl_error.cpp:145 #145487 0x00000000005f30f1 in CPLError (eErrClass=, err_no=, fmt=) at cpl_error.cpp:135 #145488 0x00000000005f909a in CPLGetTLSList () at cpl_multiproc.cpp:1054 #145489 0x00000000005f911b in CPLGetTLS (nIndex=5) at cpl_multiproc.cpp:1070 #145490 0x00000000005f248e in CPLGetErrorContext () at cpl_error.cpp:78 #145491 0x00000000005f2df1 in CPLErrorV(CPLErr, int, const char *, typedef __va_list_tag __va_list_tag *) (eErrClass=CE_Fatal, err_no=1, fmt=0xba4d90 ""pthread_setspecific() failed!"", args=0x7fffffffbed0) at cpl_error.cpp:145 #145492 0x00000000005f30f1 in CPLError (eErrClass=, err_no=, fmt=) at cpl_error.cpp:135 #145493 0x00000000005f909a in CPLGetTLSList () at cpl_multiproc.cpp:1054 #145494 0x00000000005f911b in CPLGetTLS (nIndex=5) at cpl_multiproc.cpp:1070 #145495 0x00000000005f248e in CPLGetErrorContext () at cpl_error.cpp:78 #145496 0x00000000005f2d1b in CPLSetErrorHandler (pfnErrorHandlerNew=0x452670 <_ZL16GDALErrorHandler6CPLErriPKc>) at cpl_error.cpp:654 }}}",defect,closed,normal,1.10.0,default,1.8.1,normal,fixed,,akrherz