[Webkit-unassigned] [Bug 13553] New: The static object in JSLazyEventListener::eventParameterName is destroyed after the static pthreads library is shut down
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 30 18:28:53 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=13553
Summary: The static object in
JSLazyEventListener::eventParameterName is destroyed
after the static pthreads library is shut down
Product: WebKit
Version: 522+ (nightly)
Platform: PC
OS/Version: Windows XP
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: WebCore JavaScript
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: anyang.ren at gmail.com
I'm using the nightly build WebKit-SVN-r21077 on Windows.
I am using pthreads-win32 as a static library. Therefore
I have to call pthread_win32_process_detach_np() myself.
I build a DLL that contain WebKit and pthreads-win32 code.
The problem is that it is tricky to arrange for the Visual
C++ runtime to call pthread_win32_process_detach_np() after
it calls the destructor of the static object in
JSLazyEventListener::eventParameterName. For example, if
I create a DllMain() function that calls
pthread_win32_process_detach_np(), pthread_win32_process_detach_np()
is called before the static object destructor is called.
This results in a crash in KJS:JSLock::lock() because it
does "free memory read" and "free memory write" (in Purify's
terminology).
I am not familiar with KJS code.
If I make this naive change to kjs_events.cpp to eliminate
the static object:
291,292c291
< static ProtectedPtr<JSValue> eventString = jsString("event");
< return eventString.get();
---
> return jsString("event");
I can fix the crash. I don't know if this patch is correct
or what its implications are.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list