Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 92a274ec73ed0b046d5821b8a49c309e95becfea
https://github.com/WebKit/WebKit/commit/92a274ec73ed0b046d5821b8a49c309e95becfea
Author: Yusuke Suzuki <[email protected]>
Date: 2026-09-10 (Thu, 10 Sep 2026)
Changed paths:
M Source/JavaScriptCore/wasm/debugger/WasmBreakpointManager.cpp
M Source/JavaScriptCore/wasm/debugger/WasmBreakpointManager.h
M Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.cpp
M Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.h
M Source/JavaScriptCore/wasm/debugger/WasmExecutionHandler.cpp
M Source/JavaScriptCore/wasm/debugger/tests/ExecutionHandlerTest.cpp
Log Message:
-----------
[JSC] Wasm BreakpointManager is returning Breakpoint* of HashMap and not
guaranteeing it becomes stale
https://bugs.webkit.org/show_bug.cgi?id=323910
rdar://187146401
Reviewed by Yijia Huang.
BreakpointManager is having UncheckedKeyHashMap<VirtualAddress, Breakpoint> and
returning Breakpoint*. But there is no guarantee that someone is modifying
this map while someone is using this Breakpoint*. If rehashing happens,
this pointer becomes stale. This patch makes Breakpoint Ref<> managed.
* Source/JavaScriptCore/wasm/debugger/WasmBreakpointManager.cpp:
(JSC::Wasm::BreakpointManager::setBreakpoint):
(JSC::Wasm::BreakpointManager::findBreakpoint):
(JSC::Wasm::BreakpointManager::removeBreakpointImpl):
(JSC::Wasm::BreakpointManager::clearAllBreakpoints):
* Source/JavaScriptCore/wasm/debugger/WasmBreakpointManager.h:
* Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.cpp:
* Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.h:
(JSC::Wasm::Breakpoint::Breakpoint):
(JSC::Wasm::Breakpoint::patchBreakpoint): Deleted.
(JSC::Wasm::Breakpoint::restorePatch): Deleted.
(JSC::Wasm::Breakpoint::isOneTimeBreakpoint): Deleted.
(JSC::Wasm::Breakpoint::dump const): Deleted.
* Source/JavaScriptCore/wasm/debugger/WasmExecutionHandler.cpp:
(JSC::Wasm::ExecutionHandler::handleDebuggerTrapIfNeeded):
(JSC::Wasm::ExecutionHandler::stepAtBytecode):
(JSC::Wasm::ExecutionHandler::setBreakpointAtPC):
(JSC::Wasm::ExecutionHandler::setBreakpoint):
* Source/JavaScriptCore/wasm/debugger/tests/ExecutionHandlerTest.cpp:
(ExecutionHandlerTest::testBreakpointSingleStepping):
Canonical link: https://commits.webkit.org/320884@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications