fix: harden assembly extraction rules - #936
Merged
Merged
Conversation
Contributor
4 tasks
squid-protocol
added a commit
that referenced
this pull request
Aug 1, 2026
…ix forms (#940) Independent review of merged PR #936 found `args`'s `[er][89]` matched the fictional registers "e8"/"e9" while failing to match the real r8d/r9d/r8w/ r9w/r8b/r9b sub-register forms (the trailing \b never fires between two word characters). Fixed to `r[89][dwb]?`. Also closed a real coverage gap: assembly's own _meta declares it "Backwards Compatible", yet args had zero support for the legacy 8/16-bit x86 register set (al/ah/ax, etc.) that real 16-bit real-mode code (the bootos corpus file) uses for argument coupling. Verified against the real assembly corpus through the actual Prism comment-stripping pipeline (not raw file text, which over-counts matches inside prose comments): 84->305 matches (+263%), concentrated in the 16-bit bootloader code the old pattern missed entirely. crucible_check.py diff confirmed confined to assembly; golden master fixtures re-blessed. class_start and _dependency_capture independently audited and found clean against the real corpus (no bugs found). Co-authored-by: Joe Esquibel <squid-protocol@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Aug 1, 2026
Closed
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.
Closes #856.
Updates assembly extraction rules to pass adversarial hardening.
tests/extraction/languages/test_assembly.pywith 128 comprehensive cases (valid, invalid, pathological) coveringfunc_start,args,class_start, and_dependency_capture.?,@, and.prefixes which also unblocked the negative lookahead exclusion.r0-r7) support.<name> STRUCT) alongside NASM's (struc <name>), and allowed MASM identifiers.INCLUDEandINCLUDELIBfor MASM directives and moved the rule from being case-sensitive.how_to_harden_extraction.mdwith a new recurring bug class (Class 44: Neutralized negative lookaheads).crucible_check.py --update --yesreflecting an increased density of parsed tokens due to fixed/expanded captures.