Skip to content

feat(decompiler): Rec 31 Stage 3 audit-gate — add cover.cc / cover.hh to cppRaiiAudit#89

Merged
CryptoJones merged 1 commit into
masterfrom
feat/rec-31-stage-3-cover-audit-gate
May 27, 2026
Merged

feat(decompiler): Rec 31 Stage 3 audit-gate — add cover.cc / cover.hh to cppRaiiAudit#89
CryptoJones merged 1 commit into
masterfrom
feat/rec-31-stage-3-cover-audit-gate

Conversation

@CryptoJones

Copy link
Copy Markdown
Owner

Summary

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.

Test plan

  • gradle cppRaiiAudit step continues to pass on master.
  • Adding a raw new Foo(...) anywhere in cover.cc or cover.hh fails the audit at the new file:line.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

… 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
CryptoJones merged commit 3d68df3 into master May 27, 2026
11 checks passed
@CryptoJones
CryptoJones deleted the feat/rec-31-stage-3-cover-audit-gate branch May 27, 2026 11:41
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant