Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3df36642bc36c52efd2db9f3a274a628d9bd94f0
      
https://github.com/WebKit/WebKit/commit/3df36642bc36c52efd2db9f3a274a628d9bd94f0
  Author: Ruthvik Konda <[email protected]>
  Date:   2026-03-11 (Wed, 11 Mar 2026)

  Changed paths:
    M Source/ThirdParty/ANGLE/src/common/angleutils.cpp
    M Source/ThirdParty/ANGLE/src/common/angleutils_unittest.cpp

  Log Message:
  -----------
  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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to