-
Notifications
You must be signed in to change notification settings - Fork 44
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
seg fault When applying "flattening" #16
Comments
Hi, Thanks for the report, I see you build llvm-15 but you are building with 14.0.3 from your segfault log. Is it normal ? |
I solved it with the LowerSwitchPass below. |
Well good to know. Is it related to https://reviews.llvm.org/D123607 ? There was some changed to IR in LLVM 15 |
I also encountered the same problem using android-ndk-r25c (Android (9352603, based on r450784d1) clang version 14.0.7), which can be solved by removing - analysis.intersect(LowerSwitchPass().run(F, AM));
+ // analysis.intersect(LowerSwitchPass().run(F, AM)); |
If you remove the LowerSwitchPass, you will not be able to obtain the IR intended by flattening. Use the legacyLowerSwitchPass instead. |
I compiled two libraries and the results of comparison are the same. |
I applied SCALAROPTIMIZERLATE_PASSES with flattening.
However, an error occurs when building my iPhone app.
An error occurs while executing the below source.
flattening.cpp
run(Function &F, ...)
{
analysis.intersect(LowerSwitchPass().run(F, AM)); // crash
}
llvm (clang-15) build option
cmake -S llvm -B Release -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_NEW_PASS_MANAGER=ON -DCMAKE_OSX_ARCHITECTURES=arm64 -DLLVM_CREATE_XCODE_TOOLCHAIN=ON -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"
obfuscator build option
cmake -B Release -DLLVM_DIR=/Users/kei/Downloads/llvm-project/Release/lib/cmake -DCMAKE_OSX_ARCHITECTURES=arm64
app build option
Clang -fno-legacy-pass-manager -fpass-plugin=/Users/kei/Downloads/obfuscator-llvm/Release/libLLVMObfuscator.dylib 1.c -o 1.o -DCMAKE_OSX_ARCHITECTURES=arm64
The text was updated successfully, but these errors were encountered: