[webkit-reviews] review requested: [Bug 71718] Apparent threading bug causes intermittent segfaults : [Attachment 114287] fix for static local race condition

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 9 08:20:42 PST 2011


Andrew Wason <rectalogic at rectalogic.com> has asked  for review:
Bug 71718: Apparent threading bug causes intermittent segfaults
https://bugs.webkit.org/show_bug.cgi?id=71718

Attachment 114287: fix for static local race condition
https://bugs.webkit.org/attachment.cgi?id=114287&action=review

------- Additional Comments from Andrew Wason <rectalogic at rectalogic.com>
This fixes the problem shown in the valgrind log. It allocates the
threadMapMutex() on the stack so it's destructor doesn't run at process
shutdown while outstanding WorkerThreads are still accessing it.

I did the same thing with threadMap() since it has a similar race condition.
Also I initialize threadMap in initializeThreading() to avoid another race
condition initializing it.

This patch seems to fix the problem evident in the valgrind log, but there are
remaining problems that can still cause a crash when using WebWorkers. I will
attach a helgrind log with more information shortly.


More information about the webkit-reviews mailing list