Bug 21610 - run-webkit-threads --threaded crashes in StructureID destructor
Summary: run-webkit-threads --threaded crashes in StructureID destructor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P1 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-15 05:36 PDT by Alexey Proskuryakov
Modified: 2008-10-15 23:41 PDT (History)
0 users

See Also:


Attachments
proposed fix (1.99 KB, patch)
2008-10-15 05:58 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2008-10-15 05:36:22 PDT
There is a debug-only HashSet in StructureID.cpp that is not protected with locks. This makes run-webkit-tests crash quickly.
Comment 1 Alexey Proskuryakov 2008-10-15 05:58:32 PDT
Created attachment 24359 [details]
proposed fix
Comment 2 Darin Adler 2008-10-15 09:11:40 PDT
Comment on attachment 24359 [details]
proposed fix

 #include <wtf/RefPtr.h>
+#if ENABLE(JSC_MULTIPLE_THREADS)
+#include <wtf/Threading.h>
+#endif

#ifdef'd includes normally go in a separate paragraph.

Since this is debug-only code it would be nice if there was some no-op version of Mutex and MutexLocker for the single-thread case to keep the #if to a minimum -- performance is not a critical concern.

r=me
Comment 3 Alexey Proskuryakov 2008-10-15 23:41:36 PDT
Committed revision 37630.