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

-mllvm fla error fix #10

Open
crazy-copy opened this issue Dec 2, 2023 · 2 comments
Open

-mllvm fla error fix #10

crazy-copy opened this issue Dec 2, 2023 · 2 comments

Comments

@crazy-copy
Copy link

No description provided.

@crazy-copy
Copy link
Author

crazy-copy commented Dec 2, 2023

对比了一下别处的源码 发现有个小错误 导致不能使用 fla 选项

PreservedAnalyses FlatteningPass::run(Function& F, FunctionAnalysisManager& AM) {
    Function *tmp = &F; // 传入的Function
    // 判断是否需要开启控制流平坦化
    if (toObfuscate(flag, tmp, "fla")) {

      // Lower switch
      LowerSwitchPass lower;
      lower.run(F, AM);
      #这里没有返回值导致的错误
      if (flatten(F)) {
        ++Flattened;
      }
      return PreservedAnalyses::none();
    }
    return PreservedAnalyses::all();
}
bool FlatteningPass::flatten(Function &F){
     ...
    fixStack(F);
    return true;  #这里添加返回值 就可以使用fla了

}

{83C3333B-85C6-4c1e-B779-EA6187E6AFF9}

@crazy-copy crazy-copy changed the title fla -mllvm fla error fix Dec 2, 2023
@DreamSoule
Copy link
Owner

感谢

DreamSoule added a commit that referenced this issue Dec 2, 2023
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

2 participants