OpenSLP 2.0.0.0 rare exception in SLPOpen on Windows platform
Brought to you by:
jcalcote
I found that on some rare cases (probably it depends on machine load) on Windows 7 x64 environment there unhandled exception occurs during slp.dll usage. I discovered that exception appears inside SLPOpen:
if ((res = SLPOpen(NULL, SLP_FALSE, &slp)) == SLP_OK)
and thrown at line 214 of libslp_handle.c:
handle->langtaglen = strlen(pcLang); (Access violation exception)
Like in ticket #145 I found that exception appears actually one line earlier.
Stack trace:
ntdll.dll!0000000077d0d7d8()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!0000000077ca8e59()
slp.dll!SLPMutexRelease(void * mh=0x0000000000212a50) Line 179
slp.dll!SLPPropertyGet(const char * name=0x000007fef3060158, char * buffer=0x0000000000000000, unsigned __int64 * bufszp=0x0000000000000000) Line 552 // name 0x000007fef3060158 "net.slp.locale" const char *
slp.dll!SLPOpen(const char * pcLang=0x0000000000000000, SLPBoolean isAsync=SLP_FALSE, void * * phSLP=0x000000000016d960) Line 212 + 0x11 bytes
if ((ret = SLPOpen(NULL, SLP_FALSE, &slp)) == SLP_OK)
Seems to me problem related to internal implementation of Win32 mutexes (CriticalSection) and will try to substitute threading implementation in OpenSLP project to pthread_win32 lib which can handle some abnormal behavior of WinAPI functions...