[Webkit-unassigned] [Bug 258440] [Win] ASSERTION FAILED: ::DuplicateHandle failed with error 5
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 27 17:40:02 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=258440
--- Comment #6 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Adding Sleep after OpenProcess in ArgumentCoder<Win32Handle>::decode makes this crash highly reproducible.
The web process is exiting after OpenProcess in another process.
diff --git a/Source/WebKit/Platform/IPC/win/ArgumentCodersWin.cpp b/Source/WebKit/Platform/IPC/win/ArgumentCodersWin.cpp
index 680fc1b577ac..2dff96d6ba12 100644
--- a/Source/WebKit/Platform/IPC/win/ArgumentCodersWin.cpp
+++ b/Source/WebKit/Platform/IPC/win/ArgumentCodersWin.cpp
@@ -50,6 +50,7 @@ std::optional<Win32Handle> ArgumentCoder<Win32Handle>::decode(Decoder& decoder)
auto sourceProcess = Win32Handle::adopt(::OpenProcess(PROCESS_DUP_HANDLE, FALSE, *sourcePID));
if (!sourceProcess)
return std::nullopt;
+ Sleep(100);
HANDLE duplicatedHandle;
// Copy the handle into our process and close the handle that the sending process created for us.
if (!::DuplicateHandle(sourceProcess.get(), reinterpret_cast<HANDLE>(*sourceHandle), ::GetCurrentProcess(), &duplicatedHandle, 0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)) {
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240528/6cd96d93/attachment-0001.htm>
More information about the webkit-unassigned
mailing list