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

Unable to simplify switch on enum from BinExport2Reader.class #403

Open
rohitab opened this issue Jun 8, 2024 · 0 comments
Open

Unable to simplify switch on enum from BinExport2Reader.class #403

rohitab opened this issue Jun 8, 2024 · 0 comments
Labels
bug Something isn't working Priority: Low Low priority Subsystem: Statement Structure Anything concerning how statements are structured in a method

Comments

@rohitab
Copy link

rohitab commented Jun 8, 2024

Vineflower version

1.10.1

Describe the bug

Here is the relevant section from the decompiled version of BinExport2Reader.class. Please see the comment tagged $VF.

// $VF: Unable to simplify switch on enum
// Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
private static EJumpType toJumpType(com.google.security.zynamics.BinExport.BinExport2.FlowGraph.Edge.Type var0) {
  switch (1.$SwitchMap$com$google$security$zynamics$BinExport$BinExport2$FlowGraph$Edge$Type[var0.ordinal()]) {
     case 1:
        return EJumpType.JUMP_TRUE;
     case 2:
        return EJumpType.JUMP_FALSE;
     case 3:
        return EJumpType.UNCONDITIONAL;
     case 4:
        return EJumpType.SWITCH;
     default:
        throw new IllegalArgumentException("Invalid flow graph edge type");
  }
}

Additional information

You can extract BinExport2Reader.class from the attached archive BinExport2Reader.class.zip.

It's from BinDiff version 8. The source code for the class is available in BinExport2Reader.java. You can download the complete software from the BinDiff releases page.

@rohitab rohitab added the bug Something isn't working label Jun 8, 2024
@jaskarth jaskarth added Subsystem: Statement Structure Anything concerning how statements are structured in a method Priority: Low Low priority labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Low Low priority Subsystem: Statement Structure Anything concerning how statements are structured in a method
Projects
None yet
Development

No branches or pull requests

2 participants