Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: slightly better fuzzy scanning #115

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

MewtR
Copy link
Contributor

@MewtR MewtR commented Oct 10, 2022

Closes #89


if (patternOpcode != null && patternOpcode.ordinal != originalOpcode.ordinal) {
// reaching maximum threshold (0) means,
// the pattern does not match to the current instructions
if (threshold-- == 0) break

// look ahead
for (depth in 1 until threshold + 2) {
Copy link
Member

Choose a reason for hiding this comment

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

Is threshold + 2 arbitrary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kind of, I wanted to make it so that at a minimum at least the next instruction is considered. If threshold is 0 at that point, you'll only enter that loop once since you start at 1 and would go 'until' 2 (exclusive).

Choose a reason for hiding this comment

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

@oSumAtrIX
Copy link
Member

Before merging, can you rebase & test this PR against all patches for YouTube?

@oSumAtrIX oSumAtrIX changed the base branch from main to dev December 5, 2022 21:42
@Sculas
Copy link
Contributor

Sculas commented Dec 14, 2022

Can this be merged soonish? PR has been open for a long while now, waiting for @oSumAtrIX to review.

@oSumAtrIX
Copy link
Member

If possible, please test this against a majority of the existing patches.

@MewtR
Copy link
Contributor Author

MewtR commented Dec 21, 2022

Hey, apologies for the delayed reply. I won't be able to look at this for quite some time. If someone else can pick it up that'd be great or else I think it'd be safer to close the PR.

@oSumAtrIX
Copy link
Member

Well it can stay open just fine until we can test it.

@oSumAtrIX oSumAtrIX deleted the branch ReVanced:dev May 5, 2023 23:05
@oSumAtrIX oSumAtrIX closed this May 5, 2023
@Sculas
Copy link
Contributor

Sculas commented May 5, 2023

@oSumAtrIX This should be reopened.

@Sculas
Copy link
Contributor

Sculas commented Sep 26, 2023

What's keeping this PR from being merged after almost a year? Is no one available from the team to test this change, if necessary?
This PR is quite essential, given that my implementation of fuzzy scanning is pretty mediocre.

@oSumAtrIX
Copy link
Member

oSumAtrIX commented Sep 26, 2023

It has low priority because it is currently unnecessary as well as needs to be tested if its breaking

@oSumAtrIX
Copy link
Member

I believe, if we want to properly fix and implement fuzzy scanning, something like https://github.com/intuit/fuzzy-matcher should be used instead.

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.

bug: fuzzy scanner failing if instructions are missing
4 participants