Branch: refs/heads/webkitglib/2.50
Home: https://github.com/WebKit/WebKit
Commit: d017c45b0855e30f8f51ecf91eec7f4fe09d697a
https://github.com/WebKit/WebKit/commit/d017c45b0855e30f8f51ecf91eec7f4fe09d697a
Author: Ruthvik Konda <[email protected]>
Date: 2026-03-12 (Thu, 12 Mar 2026)
Changed paths:
M Source/ThirdParty/ANGLE/src/common/angleutils.cpp
M Source/ThirdParty/ANGLE/src/common/angleutils_unittest.cpp
Log Message:
-----------
Cherry-pick 309080@main (3df36642bc36).
https://bugs.webkit.org/show_bug.cgi?id=309609
ANGLE: Add mutex to MakeStaticString to fix data race crash
https://bugs.webkit.org/show_bug.cgi?id=309609
rdar://171048125
Reviewed by Kimmo Kinnunen.
MakeStaticString() in angleutils.cpp uses a function-local static
std::set<std::string> without synchronization. When multiple
SharedWorker threads simultaneously initialize WebGL contexts via
OffscreenCanvas, concurrent find() and insert() operations corrupt
the red-black tree, causing NULL pointer dereference crashes in
__tree_balance_after_insert.
Add angle::SimpleMutex to protect the static set, following the
same heap-allocated mutex pattern used by debug.cpp's g_debugMutex.
* Source/ThirdParty/ANGLE/src/common/angleutils.cpp:
(MakeStaticString):
* Source/ThirdParty/ANGLE/src/common/angleutils_unittest.cpp:
(MakeStaticString_ThreadSafety_Test::TestBody):
Canonical link: https://commits.webkit.org/309080@main
Canonical link: https://commits.webkit.org/298234.493@webkitglib/2.50
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications