Skip to content

Program behavior changed after running obfuscator #47

Closed
@uf0wxxel

Description

@uf0wxxel

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions