Skip to content

test: regression for the extract-all crash (issue #1195)#1198

Merged
gennaroprota merged 1 commit into
cppalliance:developfrom
gennaroprota:fix/crash_when_extract_all_is_false
May 14, 2026
Merged

test: regression for the extract-all crash (issue #1195)#1198
gennaroprota merged 1 commit into
cppalliance:developfrom
gennaroprota:fix/crash_when_extract_all_is_false

Conversation

@gennaroprota
Copy link
Copy Markdown
Collaborator

@gennaroprota gennaroprota commented May 8, 2026

checkUndocumented used to call undocumented_.erase(it) without first checking it != end(). Under extract-all: false, undocumented_ never gets populated, so for any documented symbol find() returned end() and the unguarded erase was undefined behavior. A user reported this as a crash in v0.8.0. b103cba fixed this as part of an unrelated restructuring, but the existing fixture in this directory disabled warn-if-undocumented and so never reached the crashy block. The new fixture combines extract-all: false with the default warn-if-undocumented: true and includes a documented record.

Closes issue #1195.

@gennaroprota gennaroprota force-pushed the fix/crash_when_extract_all_is_false branch from 9f91899 to c9f0721 Compare May 8, 2026 14:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

⚠️ Warnings

Warning

PR description is short (631 chars) relative to the size of this change (~240 lines of churn). Aim for around 632 characters — expand on rationale, testing, and reviewer guidance.

✨ Highlights

  • 🧪 New golden tests added

🧾 Changes by Scope

Scope Lines Δ% Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
🥇 Golden Tests 100% 240 240 - 5 5 - - -
Total 100% 240 240 - 5 5 - - -

Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)

🔝 Top Files

  • test-files/golden-tests/config/extract-all/warn-when-undocumented.html (Golden Tests): 84 lines Δ (+84 / -0)
  • test-files/golden-tests/config/extract-all/warn-when-undocumented.xml (Golden Tests): 81 lines Δ (+81 / -0)
  • test-files/golden-tests/config/extract-all/warn-when-undocumented.adoc (Golden Tests): 55 lines Δ (+55 / -0)

Generated by 🚫 dangerJS against 0b10953

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.12%. Comparing base (ab5f412) to head (0b10953).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1198   +/-   ##
========================================
  Coverage    82.12%   82.12%           
========================================
  Files           33       33           
  Lines         3149     3149           
  Branches       734      734           
========================================
  Hits          2586     2586           
  Misses         387      387           
  Partials       176      176           
Flag Coverage Δ
bootstrap 82.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gennaroprota gennaroprota force-pushed the fix/crash_when_extract_all_is_false branch from c9f0721 to a1afdea Compare May 8, 2026 14:21
@gennaroprota gennaroprota linked an issue May 8, 2026 that may be closed by this pull request
@cppalliance-bot
Copy link
Copy Markdown

cppalliance-bot commented May 8, 2026

An automated preview of the documentation is available at https://1198.mrdocs.prtest2.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-05-14 14:59:08 UTC

Copy link
Copy Markdown
Collaborator

@alandefreitas alandefreitas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

`checkUndocumented` used to call `undocumented_.erase(it)` without first
checking `it != end()`. Under `extract-all: false`, `undocumented_`
never gets populated, so for any documented symbol `find()` returned
`end()` and the unguarded erase was undefined behavior. A user reported
this as a crash in v0.8.0. b103cba fixed this as part of an unrelated
restructuring, but the existing fixture in this directory disabled
`warn-if-undocumented` and so never reached the crashy block. The new
fixture combines `extract-all: false` with the default
`warn-if-undocumented: true` and includes a documented record.

Closes issue cppalliance#1195.
@gennaroprota gennaroprota force-pushed the fix/crash_when_extract_all_is_false branch from a1afdea to 0b10953 Compare May 14, 2026 14:50
@gennaroprota gennaroprota merged commit 18818c9 into cppalliance:develop May 14, 2026
25 checks passed
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.

MrDocs crashes when extract-all: false

3 participants