Fix remaining disassembly regex search quirks ##search - #26828
Merged
Merged
Conversation
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.
Fixes #26176.
The ARM64 example in the issue still failed when its regex was quoted as an argument. Investigation also reproduced missed overlapping matches across read blocks, incorrect bytewise continuation, silent truncation of long patterns, splitting inside regex character classes, and errors reported as successful shell commands.
Keeps
/adin the legacy handler. Uses the existingr_str_unquotehelper for whole-pattern arguments, accepts whitespace consistently with cmdctx, and preserves regex backslashes. Existing whole-command quoting, leading-quote calls and escaped instruction separators remain covered.Adds 11 r2r cases to
test/db/cmd/cmd_search_ad, including the original ARM64 bytes. Ten fail against unmodified master; the additional case protects alignment/maxhits behavior. Production code changes total +95/-47 lines (net +48); tests add 213 lines.Validation on Linux:
dd4b271.cmd_search,cmd_search_ad,cmd_search_asm,cmd_search_in,cmd_search_hit,cmd_search_esil,shell, andfeat_quote: 208 pass, zero unexpected failures. The existingRop search w/ branch delay (mips)remains marked BROKEN.python3 sys/lint.py --allandgit diff --checkpass.