Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2ac36ae17d1f1af96b9613399b6843441caf236e
https://github.com/WebKit/WebKit/commit/2ac36ae17d1f1af96b9613399b6843441caf236e
Author: Charlie Wolfe <[email protected]>
Date: 2026-06-23 (Tue, 23 Jun 2026)
Changed paths:
M Source/WebKit/Shared/PersistencyUtils.cpp
Log Message:
-----------
writeToDisk dereferences a disengaged std::optional when a disk write fails
https://bugs.webkit.org/show_bug.cgi?id=317343
rdar://179966362
Reviewed by Pascoe.
FileHandle::write() returns std::optional<uint64_t> and yields std::nullopt on
a non-EINTR write
failure. The error path compared `writtenBytes != rawData->size()` (a
disengaged optional never
compares equal, so the branch is taken) and then logged `*writtenBytes`,
dereferencing the
disengaged optional. Use writtenBytes.value_or(0).
* Source/WebKit/Shared/PersistencyUtils.cpp:
(WebKit::writeToDisk):
Canonical link: https://commits.webkit.org/315707@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications