RESOLVED FIXED 18488
FastMalloc doesn't release thread-specific data on Windows
https://bugs.webkit.org/show_bug.cgi?id=18488
Summary FastMalloc doesn't release thread-specific data on Windows
Alexey Proskuryakov
Reported 2008-04-14 06:09:51 PDT
FastMalloc uses pthreads support for thread-specific storage to make sure that destructors for data get called. However, pthreads-win32 only calls those from pthread_exit (or when the thread's main function returns, but only for threads created with pthread_create). Since ThreadingWin.cpp uses native Win32 functions, I believe that this data just leaks when a thread finishes. Patch forthcoming.
Attachments
proposed fix (3.98 KB, patch)
2008-04-14 06:17 PDT, Alexey Proskuryakov
aroben: review+
Alexey Proskuryakov
Comment 1 2008-04-14 06:17:16 PDT
Created attachment 20529 [details] proposed fix
Adam Roben (:aroben)
Comment 2 2008-04-14 08:59:56 PDT
Comment on attachment 20529 [details] proposed fix +#include <process.h> #include "MainThread.h" #include <windows.h> #include <wtf/HashMap.h> #include <wtf/MathExtras.h> I think process.h should be moved below MainThread.h +unsigned __stdcall wtfThreadEntryPoint(void* param) I think this should be declared static. r=me
Alexey Proskuryakov
Comment 3 2008-04-14 09:34:04 PDT
Committed revision 31864 with suggested changes.
Note You need to log in before you can comment on or make changes to this bug.