Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f349340ca9d6b6610180777b1c10eeb8ae83268e
https://github.com/WebKit/WebKit/commit/f349340ca9d6b6610180777b1c10eeb8ae83268e
Author: Claudio Saavedra <[email protected]>
Date: 2026-03-30 (Mon, 30 Mar 2026)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp
Log Message:
-----------
[GLIB] TestWebKitWebContext tests can flakily crash due to wrong string
comparison
https://bugs.webkit.org/show_bug.cgi?id=311106
Reviewed by Adrian Perez de Castro.
These tests can crash because when comparing a buffer read g_assert_cmpstr()
is used, which needs its parameters to be NULL-terminated strings. However we
are filling a fixed size array of 8 char, which is not NULL-terminated, causing
the comparison to fail and the assertion to read past the buffer end:
TestWebKitWebContext.cpp:139:static void
URISchemeTest::uriSchemeRequestCallback(WebKitURISchemeRequest *, gpointer):
assertion failed (readBuffer == "X-Test=A"): ("X-Test=A B\016\034R\177" ==
"X-Test=A")
Use g_assert_cmpmem() instead, which will also check that the read buffer
is also of the size expected.
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
Canonical link: https://commits.webkit.org/310225@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications