libupnp/threadutil
Marcelo Roberto Jimenez 44af14f387 Access violation due to changed usage of pthreads-win32
SF Bug Tracker #119, Creator: Klaus Fischer

Dear libupnp developers,

I have experienced a crash (access violation) when using libupnp on
Windows. The crash is actually located in pthreads-win32 and happens
when repeatedly de-/initializing libupnp on Win32 in the same process
and both libupnp and pthreads-win32 are compiled as static libraries.

So I'm doing this:
- UpnpInit()
- UpnpFinish()
- UpnpInit() <- Crash

I am already in touch with Ross Johnson on the pthreads-win32 mailing
list regarding this issue:

http://sourceware.org/ml/pthreads-win32/2013/msg00020.html

He told me the problem is that the functions
pthread_win32_process_attach/detach_np() should no longer be called
directly, but are invoked automatically now since version 2.9.0 of
pthreads-win32, which has been released approx. 1.5 years ago. Please
refer to above link for in-depth information.

So for proper using of latest pthreads-win32 library, those function
calls should vanish inside libupnp. Could you consider adapting libupnp
in that way? I would really like to use both libraries out-of-the-box
without local modifications, and this issue prevents that.

Best regards,
Klaus
(cherry picked from commit 2211cc14e6)
2013-11-14 15:14:44 -02:00
..
inc Access violation due to changed usage of pthreads-win32 2013-11-14 15:14:44 -02:00
src Fix memory leaks when when calling ThreadPoolAdd() or ThreadPoolAddPersistent() 2013-09-10 17:55:23 -03:00
Makefile.am Fix for incorrectly exported include files. 2011-02-06 11:55:04 -02:00