Repository navigation
feat(cpp): enforce bounded Clang static analysis - #1369
Merged
Merged
Conversation
|
Important Ownership check: this pull request is left open. |
|
Important Ownership check: this pull request is left open. |
0x4007
marked this pull request as ready for review
November 13, 2026 16:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds bounded Clang 14 static analysis to the existing C++ pilot without changing runtime C++ source. It preserves the selected core/C++/move checks and adds exactly
clang-analyzer-unix.Mallocandclang-analyzer-unix.MismatchedDeallocator, following the one completed GPT Pro recommendation. The prerequisite metadata/recovery-rule repair shipped in gpt-pro-skill PR24, with59 local tests; no extra research submission was used.Normal Pi
completeand an always-run CMake target enforce all13 real TUs. Three opt-in analysis-only control TUs never execute undefined behavior; eleven wrapper tests cover missing/foreign inputs, unsupported checks, frontend/profile/report/process failures and exception mutation boundaries. Exact checker catalogs, compilation coverage and fresh per-TU profiles are required. Emitted YAML uses the pinned Bun built-in parser. No new analyzer dependency, SDK installation, root Bun gate or hosted job is added.The original complete scan FAILED on four pinned Boost.Beast/Asio yield-reentry false positives (233.814s capture;568,934,400B group peak). That receipt remains failed. A reduced actual-Asio static probe identified the path-sensitivity issue; genuine first-party same-invocation misuse remained fatal. Classification is restricted to those four exact checker/path/location/message/note/count fingerprints and pinned tool/frontend/header/policy hashes. Raw child exit1, diagnostics and profiles remain visible; there is no broad vendor/checker suppression or zero-warning claim.
Final independent qualification on
959bc0c643b0a1611313087665a964988358e37e, tree9d7eade3059069f242eec7bd9c7816995c01361b, passed all13 source profiles withclassified:4,new:0,missing:0,unclassified_exit:0; all3 real controls/seven expected dirty diagnostic records and11 wrapper tests passed. Native ASan/UBSan/leak checkpoint and all6 CTests passed. Captures were20.538s controls,219.879s scan,143.953s checkpoint and26.789s CTest; workload clock/resources and exact receipt IDs are documented in cpp/docs/static-analysis.md. Scan peak565,817,344B; native build peak1,068,220,416B under actual1GiB cap, with0memory.max/OOM/swap events. The near-cap build is not uncapped demand; ending free2,673,020,928B remained above2GiB.Clang14 does not prove absence of shared-pointer cycles, POSIX-FD/resource leaks, deferred coroutine use-after-free or every cancellation path. Existing dynamic tests remain complementary. Earlier local review of draft6a timed out without a terminal verdict or ingested findings and remains non-gating. No workflow dispatch/rerun/enable, provider generation, production operation or new model call is part of this delivery.