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

Program behavior changed after running obfuscator #47

Closed
uf0wxxel opened this issue Aug 21, 2023 · 1 comment
Closed

Program behavior changed after running obfuscator #47

uf0wxxel opened this issue Aug 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@uf0wxxel
Copy link

Hi, thanks for the great project! I have encountered an issue when trying obfuscation with this obfuscator on some specific code.

One minimal example is:

import java.util.List;

public class Main {
    private static final List<Integer> list = List.of(1, 2, 3);

    public static void main(String[] args) {
        Integer i = null;
        for (Integer j : list) {
            if (j == 0) {
                i = j;
                break;
            }
        }
        System.out.println(i);
    }
}

The original program prints null. After obfuscation, the program prints 3 instead.

The problem should be in the syntax parsing and transforming part because it still happens when I turn off all obfuscation options.

Sample jar's for the code above, compiled by OpenJDK 17: sample.zip

@terminalsin terminalsin self-assigned this Aug 21, 2023
@terminalsin terminalsin added the bug Something isn't working label Aug 21, 2023
@terminalsin
Copy link
Member

Thank you for reporting! Must be due to our IR framework. Will add this as a test case and figure out the source of the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants