feat(decompiler): Rec 31 Stage 3 audit-gate — add cover.cc / cover.hh to cppRaiiAudit#89
Merged
Merged
Conversation
… to cppRaiiAudit `cover.cc` is one of three audit-named Stage 3 files (`database.cc` + `comment.cc` + `cover.cc` per `docs/decompiler/RAII_MIGRATION.md`). Both `cover.cc` (654 lines) and `cover.hh` (134 lines) are already raw-`new`-free in tree. Adding them to `cppRaiiAudit`'s `PROTECTED_FILES` prevents regression while the other two Stage 3 files — which still have raw-`new` sites that need code migration — are worked. Same regression-guard pattern as the Stage 1 add in PR #45 (`address.cc`, `space.cc`, `rangeutil.cc`). Empty exclusion lists on both files — every line is audited. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CryptoJones
added a commit
that referenced
this pull request
May 27, 2026
…gate (#90) Migrate the two `Comment *newcom = new Comment(...)` sites in `CommentDatabaseInternal::addComment` and `::addCommentNoDuplicate` to `auto newcom = make_unique<Comment>(...)`. Ownership transfers to `commentset` via `.release()` at the `commentset.insert(...)` call. The two interior `lower_bound` calls use `newcom.get()` to compare against existing raw `Comment*` keys in the set. The duplicate-check branch's manual `delete newcom; return false;` becomes a plain `return false;` — `unique_ptr` destroys the Comment automatically on early return. This closes a real exception-unsafety footgun: any future code addition between the `new` and the `delete` would have leaked silently. `commentset` itself remains `set<Comment*, CommentOrder>` — changing the value type to `unique_ptr<Comment>` ripples into the ordering comparator (`bool operator()(const Comment*, const Comment*)` in `comment.hh`) and every `lower_bound(Comment*)` caller. That's its own scope; this PR is the small atomic step. `comment.cc` + `comment.hh` added to `cppRaiiAudit`'s `PROTECTED_FILES`. Both now report zero raw-`new` hits under the audit's filter — any regression fails CI. Closes the `comment.cc` half of Stage 3 alongside the already- shipped `cover.cc` gate (PR #89). `database.cc` is the remaining Stage 3 file (60 raw-`new` sites — separate sprint). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CryptoJones
added a commit
that referenced
this pull request
May 27, 2026
Sprint 10 is code-closed — only Aaron-UI-action items (Automatic Dependency Submission workflow, immutable-releases toggle) and the deferred Stage 3 step 6 `-Werror` + ErrorProne ratchet (its own sprint) remain. Cut v26.1.11 to ship the [Unreleased] backlog accumulated since v26.1.10: - Rec 31 RAII Stage 2A complete (#46 marshal.cc buffer ownership) - Rec 31 RAII Stage 2B complete (#51, #73 xml.cc lvalue + global_scan lifetime) - Rec 31 RAII Stage 2C complete (#77 stack-local, #78 Element parse-tree, #82 Document return-value, #87 audit-gate) - Rec 31 RAII Stage 3 first migrations (#89 cover.cc gate, #90 comment.cc migration + gate) - Rec 28 closeout — `ignoreAudit` Stage 2 strict-by-default (#43) - Rec 13/14 OSS-Fuzz upstream submission attempted + rejected; wrapper deleted, harnesses retained for in-tree fuzzing (google/oss-fuzz#15545, #48, #49, #84) - Rec 20 RMI VMARG removed from launch.properties (#81) - release.yml Windows zip glob fix (#88) — `_windows_*` → `_win_*` so `getCurrentPlatformName()`'s `win_x86_64` token matches. Unblocks the matrix's `publish_release` job that's been silently skipped since v26.1.6. **v26.1.11 is the first release expected to actually appear on the public Releases page.** v26.1.6/8/9/10 are backlogged in drafts under "Immutable Releases" tag lockout; not recoverable under their original tags. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
cover.ccis one of three audit-named Stage 3 files (database.cc+comment.cc+cover.ccperdocs/decompiler/RAII_MIGRATION.md). Bothcover.cc(654 lines) andcover.hh(134 lines) are already raw-new-free in tree. Adding them tocppRaiiAudit'sPROTECTED_FILESprevents regression while the other two Stage 3 files — which still have raw-newsites that need code migration — are worked.Same regression-guard pattern as the Stage 1 add in PR #45 (
address.cc,space.cc,rangeutil.cc). Empty exclusion lists on both files — every line is audited.Test plan
gradle cppRaiiAuditstep continues to pass on master.new Foo(...)anywhere incover.ccorcover.hhfails the audit at the new file:line.Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/