Skip to content

[SaferCPP] analyze-safer-cpp reports "OK" for files that fail to compile#69440

Open
marcoscaceres wants to merge 1 commit into
WebKit:mainfrom
marcoscaceres:ws/dc-safercpp-swallow-fix
Open

[SaferCPP] analyze-safer-cpp reports "OK" for files that fail to compile#69440
marcoscaceres wants to merge 1 commit into
WebKit:mainfrom
marcoscaceres:ws/dc-safercpp-swallow-fix

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

249e905

[SaferCPP] analyze-safer-cpp reports "OK" for files that fail to compile

https://bugs.webkit.org/show_bug.cgi?id=317931
rdar://181330433

Reviewed by NOBODY (OOPS!).

analyze-safer-cpp ignored clang's exit code, and its diagnostic regex matches
"error:" but not "fatal error:", so a file that failed to compile was reported
as "OK" with a zero exit. On a configured-but-unbuilt compile_commands tree
(missing generated headers) every file "passes" without being analyzed.

Surface a non-zero clang exit with no parsed diagnostic as an error, printing
the file and clang's output, so a compile failure fails the run instead of
passing silently.

249e905

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ⏳ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ⏳ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
✅ 🧪 webkitpy loading 🧪 ios-wk2-wpt ⏳ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
loading 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
⏳ 🛠 ios-safer-cpp ⏳ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 api-gtk
✅ 🛠 vision-sim ⏳ 🧪 mac-intel-wk2 ⏳ 🛠 playstation
✅ 🧪 vision-wk2 ⏳ 🛠 mac-safer-cpp
✅ 🛠 tv ✅ 🧪 mac-site-isolation
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

https://bugs.webkit.org/show_bug.cgi?id=317931
rdar://181330433

Reviewed by NOBODY (OOPS!).

analyze-safer-cpp ignored clang's exit code, and its diagnostic regex matches
"error:" but not "fatal error:", so a file that failed to compile was reported
as "OK" with a zero exit. On a configured-but-unbuilt compile_commands tree
(missing generated headers) every file "passes" without being analyzed.

Surface a non-zero clang exit with no parsed diagnostic as an error, printing
the file and clang's output, so a compile failure fails the run instead of
passing silently.
@marcoscaceres marcoscaceres self-assigned this Jul 15, 2026
@marcoscaceres marcoscaceres added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label Jul 15, 2026
@marcoscaceres marcoscaceres requested a review from rniwa July 15, 2026 02:54
@marcoscaceres marcoscaceres marked this pull request as ready for review July 15, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants