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

Handle repeating sequences in a file #820

Open
rien opened this issue Aug 4, 2022 · 0 comments
Open

Handle repeating sequences in a file #820

rien opened this issue Aug 4, 2022 · 0 comments

Comments

@rien
Copy link
Member

rien commented Aug 4, 2022

Consider the following two files:

private class ClassWithArray {
      private char[] chars = {'A','B','C','D','E','F','G','H','I','J','K','L','M',
                            'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
                            'a','b','c','d','e','f','g','h','i','j','k','l','m',
                            'n','o','p','q','r','s','t','u','v','w','x','y','z'};
}
private final class ClassWithMoreArrays {
         private final static char pwdArray [] = {
      	        'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
      	        'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
      	        'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
      	        'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F',
      	        'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
      	        'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
      	        'W', 'X', 'Y', 'Z', ' '
        };
      
         private final static char base64Array [] = {
             'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
             'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
             'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
             'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
             'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
             'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
             'w', 'x', 'y', 'z', '0', '1', '2', '3',
             '4', '5', '6', '7', '8', '9', '+', '/'
        };
      }

This will cause Dolos to exhibit the following peculiar behavior:
image

This is caused by a repeating sequence in the tokens, creating a fragment for each combination of these sequences. This results in bad performance and bad user experience.

This is partially fixed by #819, but not completely. Since the above example will also cause non-overlapping sequences.

@rien rien added the bug Something isn't working label Aug 4, 2022
@rien rien removed the bug Something isn't working label Oct 3, 2024
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

No branches or pull requests

1 participant