DreamSoule / ollvm17

Obfuscation LLVM 17
230 stars 37 forks source link

clang: error: unable to execute command: Aborted (core dumped) #3

Closed k1gen closed 10 months ago

k1gen commented 10 months ago
$ llvm-project/build/bin/clang -mllvm -fla -mllvm -bcf -mllvm -bcf_prob=80 -mllvm -bcf_loop=3 -mllvm -sobf -mllvm -icall -mllvm -ibr -mllvm -igv -mllvm -sub -mllvm -sub_loop=3 -mllvm -split -mllvm -split_num=5 -o hello hello.c
[Soule] registerPipelineStartEPCallback
[Soule] run.PipelineStartEPCallback
[Soule] run.StringEncryptionPass
clang-17: /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:138: llvm::ilist_iterator<OptionsT, IsReverse, IsConst>::reference llvm::ilist_iterator<OptionsT, IsReverse, IsConst>::operator*() const [with OptionsT = llvm::ilist_detail::node_options<llvm::BasicBlock, true, false, void>; bool IsReverse = false; bool IsConst = false; reference = llvm::BasicBlock&]: Assertion `!NodePtr->isKnownSentinel()' failed.
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: /home/olk/documents/maldev/stuff/ollvm/llvm-project/build/bin/clang-17 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -dumpdir hello- -disable-free -clear-ast-before-backend -main-file-name hello.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/home/olk/documents/maldev/stuff/ollvm -resource-dir /home/olk/documents/maldev/stuff/ollvm/llvm-project/build/lib/clang/17 -internal-isystem /home/olk/documents/maldev/stuff/ollvm/llvm-project/build/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../x86_64-pc-linux-gnu/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir=/home/olk/documents/maldev/stuff/ollvm -ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -mllvm -fla -mllvm -bcf -mllvm -bcf_prob=80 -mllvm -bcf_loop=3 -mllvm -sobf -mllvm -icall -mllvm -ibr -mllvm -igv -mllvm -sub -mllvm -sub_loop=3 -mllvm -split -mllvm -split_num=5 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/hello-92921b.o -x c hello.c
1.  <eof> parser at end of file
2.  Optimizer
 #0 0x00000d9334c1a39e llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:606:3
 #1 0x00000d9334c1828b llvm::sys::RunSignalHandlers() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/lib/Support/Signals.cpp:104:20
 #2 0x00000d9334c183f6 SignalHandler(int) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #3 0x000062d74745c710 (/usr/lib/libc.so.6+0x3e710)
 #4 0x000062d7474ac83c (/usr/lib/libc.so.6+0x8e83c)
 #5 0x000062d74745c668 gsignal (/usr/lib/libc.so.6+0x3e668)
 #6 0x000062d7474444b8 abort (/usr/lib/libc.so.6+0x264b8)
 #7 0x000062d7474443dc (/usr/lib/libc.so.6+0x263dc)
 #8 0x000062d747454d26 (/usr/lib/libc.so.6+0x36d26)
 #9 0x00000d933669fd13 (/home/olk/documents/maldev/stuff/ollvm/llvm-project/build/bin/clang-17+0x98fbd13)
#10 0x00000d93366a0c67 llvm::isa_impl_cl<llvm::ConstantInt, llvm::Constant const*>::doit(llvm::Constant const*) /usr/include/c++/13.2.1/bits/allocator.h:184:7
#11 0x00000d93366a0c67 llvm::isa_impl_wrap<llvm::ConstantInt, llvm::Constant const*, llvm::Constant const*>::doit(llvm::Constant const* const&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Casting.h:137:41
#12 0x00000d93366a0c67 llvm::isa_impl_wrap<llvm::ConstantInt, llvm::Constant const* const, llvm::Constant const*>::doit(llvm::Constant const* const&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Casting.h:129:13
#13 0x00000d93366a0c67 llvm::CastIsPossible<llvm::ConstantInt, llvm::Constant const*, void>::isPossible(llvm::Constant const* const&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Casting.h:257:62
#14 0x00000d93366a0c67 llvm::CastInfo<llvm::ConstantInt, llvm::Constant* const, void>::isPossible(llvm::Constant* const&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Casting.h:509:38
#15 0x00000d93366a0c67 bool llvm::isa<llvm::ConstantInt, llvm::Constant*>(llvm::Constant* const&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Casting.h:549:46
#16 0x00000d93366a0c67 decltype(auto) llvm::cast<llvm::ConstantInt, llvm::Constant>(llvm::Constant*) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Casting.h:578:3
#17 0x00000d93366a0c67 llvm::FlatteningPass::flatten(llvm::Function&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/lib/Passes/Obfuscation/Flattening.cpp:132:36
#18 0x00000d93366a0df2 llvm::FlatteningPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/lib/Passes/Obfuscation/Flattening.cpp:23:7
#19 0x00000d933610f861 llvm::detail::PassModel<llvm::Function, llvm::FlatteningPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:3
#20 0x00000d93326be55d llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/IR/PassManager.h:521:0
#21 0x00000d93326be55d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:89:0
#22 0x00000d93345e293a llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/lib/IR/PassManager.cpp:129:41
#23 0x00000d93326a1351 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:0
#24 0x00000d93345e03d5 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/IR/PassManager.h:521:20
#25 0x00000d933548de20 llvm::SmallPtrSetImplBase::isSmall() const /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:195:33
#26 0x00000d933548de20 llvm::SmallPtrSetImplBase::~SmallPtrSetImplBase() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:83:17
#27 0x00000d933548de20 llvm::SmallPtrSetImpl<llvm::AnalysisKey*>::~SmallPtrSetImpl() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:345:7
#28 0x00000d933548de20 llvm::SmallPtrSet<llvm::AnalysisKey*, 2u>::~SmallPtrSet() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:451:7
#29 0x00000d933548de20 llvm::PreservedAnalyses::~PreservedAnalyses() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/IR/PassManager.h:152:7
#30 0x00000d933548de20 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1079:12
#31 0x00000d933549142f RunCodegenPipeline /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1089:23
#32 0x00000d933549142f EmitAssembly /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1137:21
#33 0x00000d933549142f clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1299:25
#34 0x00000d933599926a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::release() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:223:9
#35 0x00000d933599926a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::~IntrusiveRefCntPtr() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:191:34
#36 0x00000d933599926a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:386:24
#37 0x00000d93370981f9 clang::ParseAST(clang::Sema&, bool, bool) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/Parse/ParseAST.cpp:176:34
#38 0x00000d933589b3d9 clang::FrontendAction::Execute() /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1059:21
#39 0x00000d933582cbd6 llvm::Error::getPtr() const /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Error.h:270:51
#40 0x00000d933582cbd6 llvm::Error::operator bool() /home/olk/documents/maldev/stuff/ollvm/llvm-project/llvm/include/llvm/Support/Error.h:233:22
#41 0x00000d933582cbd6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1053:42
#42 0x00000d933596f761 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:273:32
#43 0x00000d933227a96e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/tools/driver/cc1_main.cpp:249:40
#44 0x00000d9332273531 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/tools/driver/driver.cpp:366:20
#45 0x00000d9332277edc clang_main(int, char**, llvm::ToolContext const&) /home/olk/documents/maldev/stuff/ollvm/llvm-project/clang/tools/driver/driver.cpp:407:26
#46 0x00000d9332287cff main /home/olk/documents/maldev/stuff/ollvm/llvm-project/build/tools/clang/tools/driver/clang-driver.cpp:16:1
#47 0x000062d747445cd0 (/usr/lib/libc.so.6+0x27cd0)
#48 0x000062d747445d8a __libc_start_main (/usr/lib/libc.so.6+0x27d8a)
#49 0x00000d9332271ce5 _start (/home/olk/documents/maldev/stuff/ollvm/llvm-project/build/bin/clang-17+0x54cdce5)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 17.0.2 (git@github.com:llvm/llvm-project.git b2417f51dbbd7435eb3aaf203de24de6754da50e)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/olk/documents/maldev/stuff/ollvm/llvm-project/build/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: /tmp/hello-ed72fa.c
clang: note: diagnostic msg: /tmp/hello-ed72fa.sh
clang: note: diagnostic msg: 

********************
DreamSoule commented 10 months ago

high probability is FLA, it incompatible with some code, just remove -mllvm -fla. if useless try remove -bcf. im not use they two because its so slow in building

k1gen commented 10 months ago

thanks a lot for a quick response, removing -mllvm -fla helped.

saidwho12 commented 6 months ago

high probability is FLA, it incompatible with some code, just remove -mllvm -fla. if useless try remove -bcf. im not use they two because its so slow in building

Is there any way to make it work with FLA? I am trying to build a windows project and a lot of options cause crashing.