Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a3f3cda54a85059955df2848f0e8ef77a850c2a8
https://github.com/WebKit/WebKit/commit/a3f3cda54a85059955df2848f0e8ef77a850c2a8
Author: Chris Dumez <[email protected]>
Date: 2026-06-03 (Wed, 03 Jun 2026)
Changed paths:
A
LayoutTests/fetch/request-clone-without-target-address-space-crash-expected.txt
A LayoutTests/fetch/request-clone-without-target-address-space-crash.html
M Source/WebCore/Modules/fetch/FetchRequest.cpp
Log Message:
-----------
Crash in FetchRequest::initializeWith() when LocalNetworkAccess is enabled
https://bugs.webkit.org/show_bug.cgi?id=316157
Reviewed by Youenn Fablet.
When constructing a Request from another Request without specifying
targetAddressSpace in the init dictionary (e.g. `new Request(other)`),
FetchRequest::initializeWith() dereferenced the empty
std::optional<IPAddressSpace> from FetchRequestInit::targetAddressSpace,
which traps with hardened libc++. The IDL member has no default value, so
the optional is std::nullopt whenever the caller omits it.
Inherit the target address space from the input request when init does
not specify one, mirroring the behavior of FetchRequest::clone().
Test: fetch/request-clone-without-target-address-space-crash.html
*
LayoutTests/fetch/request-clone-without-target-address-space-crash-expected.txt:
Added.
* LayoutTests/fetch/request-clone-without-target-address-space-crash.html:
Added.
* Source/WebCore/Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::initializeWith):
Canonical link: https://commits.webkit.org/314444@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications