Skip to content

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

Open
gennaroprota wants to merge 1 commit intocppalliance:developfrom
gennaroprota:fix/crash_when_extract_all_is_false
Open

test: regression for the extract-all crash (issue #1195)#1198
gennaroprota wants to merge 1 commit intocppalliance: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

✨ 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 a1afdea

`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.
@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 (7e73057) to head (a1afdea).

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

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-08 14:29:00 UTC

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

2 participants