[Webkit-unassigned] [Bug 287553] New: [GLib] TestUIClient.cpp dereferences std::optional without a contained value
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 12 02:05:59 PST 2025
https://bugs.webkit.org/show_bug.cgi?id=287553
Bug ID: 287553
Summary: [GLib] TestUIClient.cpp dereferences std::optional
without a contained value
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: aperez at igalia.com
CC: bugs-noreply at webkitgtk.org
Blocks: 266396
There are a few instances where Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp uses "*foo = value" instead of "foo = value" to set a value into a std::optional. This is using "operator*" which returns a reference to the contained value, and then assigning to it. Dereferencing a std::optional without a contained value is undefined behaviour, and triggers C++ library assertions (see bug #266396).
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=266396
[Bug 266396] [CMake] Allow enabling C++ library assertions if supported
--
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/20250212/2bf42e77/attachment.htm>
More information about the webkit-unassigned
mailing list