Skip to content

Control flow flattering is broken #5

@AndroidMaster25

Description

@AndroidMaster25
[armeabi-v7a] Compile arm    : zejkrrs <= sh_a32.c
[OLLVM] run.PipelineStartEPCallback
[Soule] force.run.StringEncryptionPass
[Soule] force.run.IndirectBranchPass
[Soule] force.run.IndirectGlobalVariablePass
Assertion failed: Dead.count(Pred) && "All predecessors must be dead!", file H:\Github\OLLVM-18\llvm\lib\Transforms\Utils\BasicBlockUtils.cpp, line 109
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: D:/AndroidSDK/ndk/27.2.12479018/build/../toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -MMD -MP -MF F:\\xxx\\xxx\\/obj/local/armeabi-v7a/objs/zejkrrs/shadowhook\\arch\\arm\\sh_a32.o.d -target armv7-none-linux-androideabi22 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot D:/AndroidSDK/ndk/27.2.12479018/build/../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fpic -O2 -DNDEBUG -IF:/xxx/xxx//jni/JNI -IF:/xxx/xxx//jni/libzip -IF:/xxx/xxx//jni/Nino/ -IF:/xxx/xxx//jni/Includes/ -IF:/xxx/xxx//jni/dobby -IF:/xxx/xxx//jni/dobby/include -IF:/xxx/xxx//jni/dobby/source/InterceptRouting/Routing/FunctionInlineReplace -IF:/xxx/xxx//jni/dobby/source/InterceptRouting/Routing/FunctionInlineHook -IF:/xxx/xxx//jni/dobby/source -IF:/xxx/xxx//jni/dobby/source/dobby -IF:/xxx/xxx//jni/dobby/source/include -IF:/xxx/xxx//jni/dobby/xnucxx/xnucxx -IF:/xxx/xxx//jni/dobby/external/logging -IF:/xxx/xxx//jni/dobby/external/misc-helper -IF:/xxx/xxx//jni/dobby/external -IF:/xxx/xxx//jni/dobby/source/Backend/UserMode/ -IF:/xxx/xxx//jni/dobby/builtin-plugin -IF:/xxx/xxx//jni/dobby/builtin-plugin/SymbolResolver -IF:/xxx/xxx//jni/shadowhook/arch/arm -IF:/xxx/xxx//jni/shadowhook/common -IF:/xxx/xxx//jni/shadowhook/third_party/lss -IF:/xxx/xxx//jni/shadowhook/third_party/bsd -IF:/xxx/xxx//jni/shadowhook/third_party/xdl -IF:/xxx/xxx//jni/shadowhook/include -IF:/xxx/xxx//jni/shadowhook/ -IF:/xxx/xxx//jni/Substrate -IF:/xxx/xxx//jni -DANDROID -IF:/xxx/xxx//jni/libs/curl/armeabi-v7a/include -IF:/xxx/xxx//jni/libs/openssl/armeabi-v7a/include -Wno-error=format-security -w -std=c17 -fexceptions -ffunction-sections -fdata-sections -fvisibility-inlines-hidden -fvisibility=hidden -frtti -fpermissive -fms-extensions -mllvm -fla -mllvm -bcf -mllvm -sobf -mllvm -icall -mllvm -ibr -mllvm -igv -mllvm -sub -mllvm -split -Wformat -Werror=format-security -c F:/xxx/xxx//jni/shadowhook\\arch\\arm\\sh_a32.c -o F:\\xxx\\xxx\\/obj/local/armeabi-v7a/objs/zejkrrs/shadowhook\\arch\\arm\\sh_a32.o
1.      <eof> parser at end of file
2.      Optimizer
Exception Code: 0x80000003
 #0 0x00007ff623471abc HandleAbort H:\Github\OLLVM-18\llvm\lib\Support\Windows\Signals.inc:424:0
 #1 0x00007ff993f19ea7 (C:\Windows\SYSTEM32\ucrtbased.dll+0x99ea7)
 #2 0x00007ff993f1bae9 (C:\Windows\SYSTEM32\ucrtbased.dll+0x9bae9)
 #3 0x00007ff993f21745 (C:\Windows\SYSTEM32\ucrtbased.dll+0xa1745)
 #4 0x00007ff993f213b7 (C:\Windows\SYSTEM32\ucrtbased.dll+0xa13b7)
 #5 0x00007ff993f1f381 (C:\Windows\SYSTEM32\ucrtbased.dll+0x9f381)
 #6 0x00007ff993f21caf (C:\Windows\SYSTEM32\ucrtbased.dll+0xa1caf)
 #7 0x00007ff6236380b8 llvm::DeleteDeadBlocks(class llvm::ArrayRef<class llvm::BasicBlock *>, class llvm::DomTreeUpdater *, bool) H:\Github\OLLVM-18\llvm\lib\Transforms\Utils\BasicBlockUtils.cpp:109:0
 #8 0x00007ff623657047 llvm::removeUnreachableBlocks(class llvm::Function &, class llvm::DomTreeUpdater *, class llvm::MemorySSAUpdater *) H:\Github\OLLVM-18\llvm\lib\Transforms\Utils\Local.cpp:3194:0
 #9 0x00007ff62d5f3f7c OptimizeFunctions H:\Github\OLLVM-18\llvm\lib\Transforms\IPO\GlobalOpt.cpp:1951:0
#10 0x00007ff62d5f6505 optimizeGlobalsInModule H:\Github\OLLVM-18\llvm\lib\Transforms\IPO\GlobalOpt.cpp:2441:0
#11 0x00007ff62d5e9f72 llvm::GlobalOptPass::run(class llvm::Module &, class llvm::AnalysisManager<class llvm::Module> &) H:\Github\OLLVM-18\llvm\lib\Transforms\IPO\GlobalOpt.cpp:2501:0
#12 0x00007ff6262018e8 llvm::detail::PassModel<class llvm::Module, class llvm::GlobalOptPass, class llvm::PreservedAnalyses, class llvm::AnalysisManager<class llvm::Module>>::run(class llvm::Module &, class llvm::AnalysisManager<class llvm::Module> &) H:\Github\OLLVM-18\llvm\include\llvm\IR\PassManagerInternal.h:89:0
#13 0x00007ff62287bf31 llvm::PassManager<class llvm::Module, class llvm::AnalysisManager<class llvm::Module>>::run(class llvm::Module &, class llvm::AnalysisManager<class llvm::Module> &) H:\Github\OLLVM-18\llvm\include\llvm\IR\PassManager.h:543:0
#14 0x00007ff623e2efa3 `anonymous namespace'::EmitAssemblyHelper::RunOptimizationPipeline H:\Github\OLLVM-18\clang\lib\CodeGen\BackendUtil.cpp:1150:0
#15 0x00007ff623e2f99c `anonymous namespace'::EmitAssemblyHelper::EmitAssembly H:\Github\OLLVM-18\clang\lib\CodeGen\BackendUtil.cpp:1216:0
#16 0x00007ff623e2a869 clang::EmitBackendOutput(class clang::DiagnosticsEngine &, class clang::HeaderSearchOptions const &, class clang::CodeGenOptions const &, class clang::TargetOptions const &, class clang::LangOptions const &, class llvm::StringRef, class llvm::Module *, enum clang::BackendAction, class llvm::IntrusiveRefCntPtr<class llvm::vfs::FileSystem>, class std::unique_ptr<class llvm::raw_pwrite_stream, struct std::default_delete<class llvm::raw_pwrite_stream>>, class clang::BackendConsumer *) H:\Github\OLLVM-18\clang\lib\CodeGen\BackendUtil.cpp:1377:0
#17 0x00007ff6249efee0 clang::BackendConsumer::HandleTranslationUnit(class clang::ASTContext &) H:\Github\OLLVM-18\clang\lib\CodeGen\CodeGenAction.cpp:379:0
#18 0x00007ff628eff4ce clang::ParseAST(class clang::Sema &, bool, bool) H:\Github\OLLVM-18\clang\lib\Parse\ParseAST.cpp:183:0
#19 0x00007ff624eade22 clang::ASTFrontendAction::ExecuteAction(void) H:\Github\OLLVM-18\clang\lib\Frontend\FrontendAction.cpp:1183:0
#20 0x00007ff6249ed077 clang::CodeGenAction::ExecuteAction(void) H:\Github\OLLVM-18\clang\lib\CodeGen\CodeGenAction.cpp:1153:0
#21 0x00007ff624ead65c clang::FrontendAction::Execute(void) H:\Github\OLLVM-18\clang\lib\Frontend\FrontendAction.cpp:1069:0
#22 0x00007ff624e6a5f4 clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) H:\Github\OLLVM-18\clang\lib\Frontend\CompilerInstance.cpp:1057:0
#23 0x00007ff625141a56 clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) H:\Github\OLLVM-18\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:272:0
#24 0x00007ff61d8244ca cc1_main(class llvm::ArrayRef<char const *>, char const *, void *) H:\Github\OLLVM-18\clang\tools\driver\cc1_main.cpp:294:0
#25 0x00007ff61d80a94f ExecuteCC1Tool H:\Github\OLLVM-18\clang\tools\driver\driver.cpp:365:0
#26 0x00007ff61d80cc91 `clang_main'::`43'::<lambda_1>::operator() H:\Github\OLLVM-18\clang\tools\driver\driver.cpp:505:0
#27 0x00007ff61d81247e llvm::function_ref<int __cdecl(llvm::SmallVectorImpl<char const *> &)>::callback_fn<`clang_main'::`43'::<lambda_1> > H:\Github\OLLVM-18\llvm\include\llvm\ADT\STLFunctionalExtras.h:47:0
#28 0x00007ff624bf3a7e llvm::function_ref<(class llvm::SmallVectorImpl<char const *> &)>::operator()(class llvm::SmallVectorImpl<char const *> &) const H:\Github\OLLVM-18\llvm\include\llvm\ADT\STLFunctionalExtras.h:69:0
#29 0x00007ff624bef6f1 `clang::driver::CC1Command::Execute'::`7'::<lambda_1>::operator() H:\Github\OLLVM-18\clang\lib\Driver\Job.cpp:440:0
#30 0x00007ff624bf2b44 llvm::function_ref<void __cdecl(void)>::callback_fn<`clang::driver::CC1Command::Execute'::`7'::<lambda_1> > H:\Github\OLLVM-18\llvm\include\llvm\ADT\STLFunctionalExtras.h:45:0
#31 0x00007ff6215a20b4 llvm::function_ref<(void)>::operator()(void) const H:\Github\OLLVM-18\llvm\include\llvm\ADT\STLFunctionalExtras.h:68:0
#32 0x00007ff62342df3b llvm::CrashRecoveryContext::RunSafely(class llvm::function_ref<(void)>) H:\Github\OLLVM-18\llvm\lib\Support\CrashRecoveryContext.cpp:235:0
#33 0x00007ff624bed657 clang::driver::CC1Command::Execute(class llvm::ArrayRef<class std::optional<class llvm::StringRef>>, class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> *, bool *) const H:\Github\OLLVM-18\clang\lib\Driver\Job.cpp:440:0
#34 0x00007ff624a9ef88 clang::driver::Compilation::ExecuteCommand(class clang::driver::Command const &, class clang::driver::Command const *&, bool) const H:\Github\OLLVM-18\clang\lib\Driver\Compilation.cpp:199:0
#35 0x00007ff624a9f22c clang::driver::Compilation::ExecuteJobs(class clang::driver::JobList const &, class llvm::SmallVectorImpl<struct std::pair<int, class clang::driver::Command const *>> &, bool) const H:\Github\OLLVM-18\clang\lib\Driver\Compilation.cpp:253:0
#36 0x00007ff624a311c0 clang::driver::Driver::ExecuteCompilation(class clang::driver::Compilation &, class llvm::SmallVectorImpl<struct std::pair<int, class clang::driver::Command const *>> &) H:\Github\OLLVM-18\clang\lib\Driver\Driver.cpp:1918:0
#37 0x00007ff61d80c860 clang_main(int, char **, struct llvm::ToolContext const &) H:\Github\OLLVM-18\clang\tools\driver\driver.cpp:540:0
#38 0x00007ff61d857b56 main H:\Github\OLLVM-18\build\tools\clang\tools\driver\clang-driver.cpp:17:0
#39 0x00007ff62d2935e9 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
#40 0x00007ff62d2934d2 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#41 0x00007ff62d29338e __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
#42 0x00007ff62d29367e mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
#43 0x00007ffa58fa259d (C:\Windows\System32\KERNEL32.DLL+0x1259d)
#44 0x00007ffa59e4af38 (C:\Windows\SYSTEM32\ntdll.dll+0x5af38)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 18.1.8 (https://github.com/CYRUS-STUDIO/LLVM.git e917676096dc561f3c79abb075c12dd26aa85e0c)
Target: armv7-none-linux-android22
Thread model: posix
InstalledDir: D:\AndroidSDK\ndk\27.2.12479018\build\..\toolchains\llvm\prebuilt\windows-x86_64\bin
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: C:\Users\xxx\AppData\Local\Temp\sh_a32-22702d.c
clang: note: diagnostic msg: C:\Users\xxx\AppData\Local\Temp\sh_a32-22702d.sh
clang: note: diagnostic msg:

********************
make: *** [D:/AndroidSDK/ndk/27.2.12479018/build/../build/core/build-binary.mk:420: F:\xxx\xxx\/obj/local/armeabi-v7a/objs/zejkrrs/shadowhook\arch\arm\sh_a32.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions