darling icon indicating copy to clipboard operation
darling copied to clipboard

Clang12 Segmentation fault

Open tukanoidd opened this issue 3 years ago • 3 comments

Build Log What is the build error?

Stack dump:
0.      Program arguments: /usr/bin/clang-12 -cc1 -triple i386-apple-macosx10.15.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name ClosureBuilder.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-rounding-math -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -tune-cpu generic -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=gdb -nostdsysteminc -nobuiltininc -resource-dir /usr/lib/clang/12.0.0 -dependency-file CMakeFiles/system_dyld_obj.dir/dyld3/ClosureBuilder.cpp.o.d -MT src/dyld/CMakeFiles/system_dyld_obj.dir/dyld3/ClosureBuilder.cpp.o -sys-header-deps -isystem /usr/lib/clang/12.0.0/include -include /home/tukanoid/dev/Software/darling/src/duct/include/CrashReporterClient.h -D DARLING -D DARWIN -D HAVE_STDINT_H=1 -D TARGET_OS_MAC=1 -D _DARWIN_C_SOURCE -D _LIBCPP_NO_EXCEPTIONS=1 -D _LIBC_NO_FEATURE_VERIFICATION -D _POSIX_C_SOURCE -D __APPLE__ -D __DYNAMIC__ -D __MACH__ -I /home/tukanoid/dev/Software/darling/src/dyld/src -I /home/tukanoid/dev/Software/darling/src/dyld/dyld3 -I /home/tukanoid/dev/Software/darling/src/dyld/dyld3/shared-cache -I /home/tukanoid/dev/Software/darling/src/dyld/include/mach-o -I /home/tukanoid/dev/Software/darling/src/dyld/include -I /home/tukanoid/dev/Software/darling/src/external/libcxx/include -I /home/tukanoid/dev/Software/darling/build/src/include -I /home/tukanoid/dev/Software/darling/src/include -I /home/tukanoid/dev/Software/darling/basic-headers -I /home/tukanoid/dev/Software/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I /home/tukanoid/dev/Software/darling/build/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I /home/tukanoid/dev/Software/darling/framework-include -I /home/tukanoid/dev/Software/darling/src/external/lkm/include -I /home/tukanoid/dev/Software/darling/src/libDiagnosticMessagesClient/include -I /home/tukanoid/dev/Software/darling/src/frameworks/include -I /home/tukanoid/dev/Software/darling/src/private-frameworks/include -I /home/tukanoid/dev/Software/darling/src/lib/include -I /home/tukanoid/dev/Software/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 -I /home/tukanoid/dev/Software/darling/build/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 -I /home/tukanoid/dev/Software/darling/src/dyld/launch-cache -I /home/tukanoid/dev/Software/darling/src/dyld -D BUILDING_LIBDYLD=1 -stdlib=libc++ -O0 -Wno-nullability-completeness -Wno-deprecated-declarations -Wno-availability -Wno-expansion-to-defined -Wno-elaborated-enum-base -Wno-undef-prefix -Wno-availability -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /home/tukanoid/dev/Software/darling/build/src/dyld -ferror-limit 19 -stack-protector 1 -fblocks -fencode-extended-block-signature -fno-rtti -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fobjc-subscripting-legacy-runtime -fmax-type-align=16 -fcolor-diagnostics -o /tmp/ClosureBuilder-1c9144.o -x c++ /home/tukanoid/dev/Software/darling/src/dyld/dyld3/ClosureBuilder.cpp
1.      <eof> parser at end of file
2.      Code generation
 #0 0x00007fc22cff4643 (/usr/bin/../lib/libLLVM-12.so+0xb48643)
 #1 0x00007fc22cff1d46 (/usr/bin/../lib/libLLVM-12.so+0xb45d46)
 #2 0x00007fc22c106da0 __restore_rt (/usr/bin/../lib/libc.so.6+0x3cda0)
 #3 0x00007fc22d98faf0 llvm::DIE::getUnitDie() const (/usr/bin/../lib/libLLVM-12.so+0x14e3af0)
 #4 0x00007fc22d9b0f3d llvm::DwarfDebug::finishEntityDefinitions() (/usr/bin/../lib/libLLVM-12.so+0x1504f3d)
 #5 0x00007fc22d9c5456 llvm::DwarfDebug::finalizeModuleInfo() (/usr/bin/../lib/libLLVM-12.so+0x1519456)
 #6 0x00007fc22d9cd130 llvm::DwarfDebug::endModule() (/usr/bin/../lib/libLLVM-12.so+0x1521130)
 #7 0x00007fc22d978026 llvm::AsmPrinter::doFinalization(llvm::Module&) (/usr/bin/../lib/libLLVM-12.so+0x14cc026)
 #8 0x00007fc22d14567d llvm::FPPassManager::doFinalization(llvm::Module&) (/usr/bin/../lib/libLLVM-12.so+0xc9967d)
 #9 0x00007fc22d1522b8 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/../lib/libLLVM-12.so+0xca62b8)
#10 0x00007fc233fde173 (/usr/bin/../lib/libclang-cpp.so.12+0x1898173)
#11 0x00007fc233fe0035 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/bin/../lib/libclang-cpp.so.12+0x189a035)
#12 0x00007fc23435d5e2 (/usr/bin/../lib/libclang-cpp.so.12+0x1c175e2)
#13 0x00007fc23307d659 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib/libclang-cpp.so.12+0x937659)
#14 0x00007fc234ac8249 clang::FrontendAction::Execute() (/usr/bin/../lib/libclang-cpp.so.12+0x2382249)
#15 0x00007fc234a5f54e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib/libclang-cpp.so.12+0x231954e)
#16 0x00007fc234b48929 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib/libclang-cpp.so.12+0x2402929)
#17 0x000055ed43b5a8de cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-12+0x128de)
#18 0x000055ed43b57ee8 (/usr/bin/clang-12+0xfee8)
#19 0x000055ed43b54505 main (/usr/bin/clang-12+0xc505)
#20 0x00007fc22c0f1b25 __libc_start_main (/usr/bin/../lib/libc.so.6+0x27b25)
#21 0x000055ed43b5786e _start (/usr/bin/clang-12+0xf86e)
clang-12: error: unable to execute command: Segmentation fault (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 12.0.0
Target: x86_64-apple-darwin19
Thread model: posix
InstalledDir: /usr/bin
clang-12: note: diagnostic msg: Error generating preprocessed source(s) - cannot generate preprocessed source with multiple -arch options.
make[2]: *** [src/dyld/CMakeFiles/system_dyld_obj.dir/build.make:241: src/dyld/CMakeFiles/system_dyld_obj.dir/dyld3/ClosureBuilder.cpp.o] Error 254
make[1]: *** [CMakeFiles/Makefile2:24678: src/dyld/CMakeFiles/system_dyld_obj.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

System Information Building with Manjaro x86_64 with all packages up to date and all dependencies installed. Lenovo Legion 7 15IMH05 i7-10750H @ 2.60GHz 32GB RAM (2x Crucial 16GB 2400MHz DDR4 SODIMM)

| Software | Version | | Clang | 12.0.0 | | CMake | 3.20.3 | | Linux Kernel | 5.12.9-1-MANJARO | | Darling | dd18f7bb2597072f330617f73615a2817d62c976 |

tukanoidd avatar Jul 06 '21 21:07 tukanoidd

It's a Clang crash — you should report it to LLVM :)

bugaevc avatar Jul 06 '21 21:07 bugaevc

I've seen this happening for me, too; it seems to be spurious, usually just trying again allows it compile successfully. But yeah, this is LLVM/Clang's problem, not ours.

facekapow avatar Jul 06 '21 21:07 facekapow

Ah, ok, I just thought that this line: clang-12: note: diagnostic msg: Error generating preprocessed source(s) - cannot generate preprocessed source with multiple -arch options. meant that something's wrong with the makefile configuration which causes clang to crash and its not a crash but force close rather because of that configuration mishap

tukanoidd avatar Jul 06 '21 21:07 tukanoidd