docs: add a README.md to every trap folder - #1
Merged
Merged
Conversation
Each of the 42 trap folders now carries a short conceptual README next to its code and debugger notes, so the rule itself lives with the example instead of only in the root index. Division of labour inside a trap folder: README.md - the rule, why the code breaks it, correct direction debug_analysis.md - WinDbg/CDB session and evidence debug_analysis.txt - raw console transcript Every README states whether the trap is undefined behaviour, unspecified, IFNDR or simply defined-but-wrong, and its Detection table always names at least one tool that does NOT catch the bug. Claims about _unsafe targets and ctest names were verified against CMakeLists.txt and the sources. Root README.md and TRAP_GUIDE.md updated to describe the new structure. No source or build changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7d5d2a61-df05-47bc-bd58-4248a591ae43
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.
Each of the 42 trap folders now carries a short conceptual README next to its code and debugger notes, so the rule itself lives with the example instead of only in the root index table.
Division of labour inside a trap folder
README.mddebug_analysis.mddebug_analysis.txtKeeping the debugger commands out of the README is deliberate: it is the boundary that stops the two documents from drifting apart.
README template
Every file follows the same shape (~45–65 lines):
**Rule:**one-liner →## The rule→## In this code→## Why it fails→## Correct direction→## Detection→## Next.Two rules were enforced throughout:
std::terminatein Trap 42 is standard-mandated, Trap 27/28 are IFNDR. Trap 23 is called out as mixed: the moved-from value is unspecified, but theunique_ptrbranch really is UB.Verification
Claims were checked against the repository rather than trusted:
_unsafetarget mentions verified against theRUN_UNSAFE_EXAMPLEmarker CMake actually greps for (including Trap 27, whose marker lives inprovider.cpp, notmain.cpp).ctest -Rname verified againstCMakeLists.txt— no invented test names.# Trap NNheading matches its folder.Also
Root
README.mdgains a "what is inside a trap folder" section, andTRAP_GUIDE.mdnotes that it is the index and each row is expanded by that folder's README.No source or build changes.
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com
Copilot-Session: 7d5d2a61-df05-47bc-bd58-4248a591ae43