Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Constant encryption crash #23

Closed
udishamir opened this issue Dec 5, 2022 · 8 comments
Closed

Constant encryption crash #23

udishamir opened this issue Dec 5, 2022 · 8 comments

Comments

@udishamir
Copy link

udishamir commented Dec 5, 2022

System: Ubuntu 22.0.4 Server
when calling with -mllvm enable-constenc
0. Program arguments: /usr/local/bin/clang-15 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name ipaddress.c -static-define -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fcoverage-compilation-dir=/home/ta1on/code/watchtower -resource-dir /usr/local/lib/clang/15.0.2 -internal-isystem /usr/local/lib/clang/15.0.2/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -fdebug-compilation-dir=/home/ta1on/code/watchtower -ferror-limit 19 -pthread -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -enable-constenc -mllvm -enable-subobf -mllvm -enable-cffobf -mllvm -enable-bcfobf -mllvm -enable-splitobf -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/ipaddress-e160ec.o -x c ipaddress.c

  1. parser at end of file
  2. Optimizer
    #0 0x000055985cfcc784 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
    处理OpaquePointer的方式是错误/不合规的 #1 0x000055985cfc9fe4 SignalHandler(int) Signals.cpp:0:0
    AntiClassDump and FunctionCallObfuscate HandleObjc does not support Opaque Pointers #2 0x00007fea0eb8f420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
    FunctionWrapper: 一些情况下,参数可能不正确 #3 0x000055985d182471 eliminateDeadSwitchCases(llvm::SwitchInst*, llvm::DomTreeUpdater*, llvm::AssumptionCache*, llvm::DataLayout const&) SimplifyCFG.cpp:0:0
    how to build #4 0x000055985d19cf6c (anonymous namespace)::SimplifyCFGOpt::simplifySwitch(llvm::SwitchInst*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&) SimplifyCFG.cpp:0:0
    Hanabi: arm64e架构Objc字符串混淆报错 #5 0x000055985d1a0c2b llvm::simplifyCFG(llvm::BasicBlock*, llvm::TargetTransformInfo const&, llvm::DomTreeUpdater*, llvm::SimplifyCFGOptions const&, llvm::ArrayRefllvm::WeakVH) (/usr/local/bin/clang-15+0x3a14c2b)
    c++ excpetion handle obfuscation support for Flattening #6 0x000055985ce9e855 iterativelySimplifyCFG(llvm::Function&, llvm::TargetTransformInfo const&, llvm::DomTreeUpdater*, llvm::SimplifyCFGOptions const&) SimplifyCFGPass.cpp:0:0
    Hanabi AntiClassDump arm64e编译报错 #7 0x000055985ce9f6be simplifyFunctionCFGImpl(llvm::Function&, llvm::TargetTransformInfo const&, llvm::DominatorTree*, llvm::SimplifyCFGOptions const&) SimplifyCFGPass.cpp:0:0
    StringEncryption无法加密全局变量形式声明的字符串 #8 0x000055985cea096f llvm::SimplifyCFGPass::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/usr/local/bin/clang-15+0x371496f)
    Flattening: Swift混淆可能编译报错 #9 0x000055985b27d096 llvm::detail::PassModel<llvm::Function, llvm::SimplifyCFGPass, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function>::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/usr/local/bin/clang-15+0x1af1096)
    Flattening: Objc Try...Catch可能导致无法编译 #10 0x000055985ac00858 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManagerllvm::Function>, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function>::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/usr/local/bin/clang-15+0x1474858)
    bug in used #11 0x000055985c7b4193 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/usr/local/bin/clang-15+0x3028193)
    Can't compile Hanabi lib #12 0x000055985abf4fa6 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/usr/local/bin/clang-15+0x1468fa6)
    String encryption don't seem to work #13 0x000055985c7b36e2 llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/usr/local/bin/clang-15+0x30276e2)
    Hanabi does not work properly on macOS Ventura #14 0x000055985d370ad3 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream>&, std::unique_ptr<llvm::ToolOutputFile, std::default_deletellvm::ToolOutputFile>&) (.constprop.0) BackendUtil.cpp:0:0
    Hanabi Build Instructions #15 0x000055985d373cd9 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream>) (/usr/local/bin/clang-15+0x3be7cd9)
    我编译 arm64e的代码无法通过 #16 0x000055985e1ea248 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/clang-15+0x4a5e248)
    Hanabi stopped working on Monterey 12.6  #17 0x000055985f088e09 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/clang-15+0x58fce09)
    当使用-mllvm -enable-cffobf时, 报错Internal error: atom is missing a symbolIndex #18 0x000055985e1e9835 clang::CodeGenAction::ExecuteAction() (/usr/local/bin/clang-15+0x4a5d835)
    functions annotations not work #19 0x000055985daf1da1 clang::FrontendAction::Execute() (/usr/local/bin/clang-15+0x4365da1)
    any one tried with Xcode 14.1 ? #20 0x000055985da79aa3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/clang-15+0x42edaa3)
    bigsur build issue #21 0x000055985dbd06ab clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/clang-15+0x44446ab)
    Linking process fail #22 0x000055985a925e34 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang-15+0x1199e34)
    Constant encryption crash #23 0x000055985a91f3db ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
    building on macOS #24 0x000055985a9219c0 clang_main(int, char**) (/usr/local/bin/clang-15+0x11959c0)
    Rearranging of basic blocks (question) #25 0x00007fea0e60d083 __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:342:3
@61bcdefg
Copy link
Owner

61bcdefg commented Dec 5, 2022

-O3

Replace this with -O0

@udishamir
Copy link
Author

udishamir commented Dec 5, 2022 via email

@udishamir
Copy link
Author

udishamir commented Dec 5, 2022 via email

@udishamir
Copy link
Author

udishamir commented Dec 6, 2022 via email

@61bcdefg
Copy link
Owner

61bcdefg commented Dec 6, 2022

Try 6497be7

@udishamir
Copy link
Author

udishamir commented Dec 6, 2022 via email

@61bcdefg
Copy link
Owner

Has the problem been solved?

@udishamir
Copy link
Author

udishamir commented Dec 15, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants