Bug 312303
| Summary: | [WTF][GLib] Building with Clang 22 produces -Wunsafe-buffer-usage-in-format-attr-call warning spam in sysprof code | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adrian Perez <aperez> |
| Component: | Web Template Framework | Assignee: | Adrian Perez <aperez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Adrian Perez
../Source/WTF/wtf/glib/SysprofAnnotator.h:56:9: warning: formatting function 'sysprof_collector_mark_vprintf' is unsafe [-Wunsafe-buffer-usage-in-format-attr-call]
56 | sysprof_collector_mark_vprintf(SYSPROF_CAPTURE_CURRENT_TIME, 0, m_processName, name.data(), description, args);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../Source/WTF/wtf/glib/SysprofAnnotator.h:56:101: note: string argument is not guaranteed to be null-terminated
56 | sysprof_collector_mark_vprintf(SYSPROF_CAPTURE_CURRENT_TIME, 0, m_processName, name.data(), description, args);
| ^~~~~~~~~~~
../Source/WTF/wtf/glib/SysprofAnnotator.h:64:9: warning: formatting function 'sysprof_collector_mark_vprintf' is unsafe [-Wunsafe-buffer-usage-in-format-attr-call]
64 | sysprof_collector_mark_vprintf(time, 0, m_processName, name.data(), description, args);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../Source/WTF/wtf/glib/SysprofAnnotator.h:64:77: note: string argument is not guaranteed to be null-terminated
64 | sysprof_collector_mark_vprintf(time, 0, m_processName, name.data(), description, args);
| ^~~~~~~~~~~
../Source/WTF/wtf/glib/SysprofAnnotator.h:146:13: warning: formatting function 'sysprof_collector_mark_vprintf' is unsafe [-Wunsafe-buffer-usage-in-format-attr-call]
146 | sysprof_collector_mark_vprintf(time, 0, m_processName, name.data(), description, args);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../Source/WTF/wtf/glib/SysprofAnnotator.h:146:81: note: string argument is not guaranteed to be null-terminated
146 | sysprof_collector_mark_vprintf(time, 0, m_processName, name.data(), description, args);
| ^~~~~~~~~~~
../Source/WTF/wtf/glib/RunLoopGLib.cpp:108:13: warning: formatting function 'instantMark' is unsafe [-Wunsafe-buffer-usage-in-format-attr-call]
108 | WTFEmitSignpost(source, RunLoopSourceDispatch, "[%s] lateness=%" G_GINT64_FORMAT "µs", g_source_get_name(source), lateness);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../Source/WTF/wtf/SystemTracing.h:425:13: note: expanded from macro 'WTFEmitSignpost'
425 | annotator->instantMark(std::span(_STRINGIFY(name)), "" __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../Source/WTF/wtf/glib/RunLoopGLib.cpp:108:101: note: string argument is not guaranteed to be null-terminated
108 | WTFEmitSignpost(source, RunLoopSourceDispatch, "[%s] lateness=%" G_GINT64_FORMAT "µs", g_source_get_name(source), lateness);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../Source/WTF/wtf/SystemTracing.h:425:68: note: expanded from macro 'WTFEmitSignpost'
425 | annotator->instantMark(std::span(_STRINGIFY(name)), "" __VA_ARGS__); \
| ^~~~~~~~~~~
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/62764
EWS
Committed 311265@main (24453f37f659): <https://commits.webkit.org/311265@main>
Reviewed commits have been landed. Closing PR #62764 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/174812269>