-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
clang crashes on "-v --target=powerpc-apple-darwin8 --print-supported-cpus" #47698
Comments
Still crashing as of post-17 trunk: https://godbolt.org/z/oM8W8c6Eh
|
@llvm/issue-subscribers-clang-driver |
This breaks tests on macOS: http://45.33.8.238/macm1/68904/step_7.txt Please take a look and revert for now if it takes a while to fix. |
We started seeing the same test failure (
|
Actually, now that check-clang passes, I see that many tests in check-llvm are also broken: http://45.33.8.238/macm1/68957/step_11.txt I bisected the failure of llvm/test/CodeGen/AMDGPU/bf16.ll to 9f77fac as well. ( #!/bin/bash
set -e
ninja -C out/gn llvm/test -j250 || exit 125
out/gn/bin/llvm-lit llvm/test/CodeGen/AMDGPU/bf16.ll -sv ) |
…/macos triples" This reverts commit 9f77fac. The change unintentionally changed lots of codegen, see #47698 (comment) Also revert a follow-up: This reverts commit b40a5be.
The issue is uncovered by #47698: for IR files without a target triple, -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly.
The issue is uncovered by #47698: for assembly files, -triple= specifies the full target triple while -arch= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -arch= is error-prone and not recommended for tests. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly. Due to the nature of the issue, we don't see the issue in tests using architectures that any of Mach-O/COFF/XCOFF supports.
…riples The removal started at https://reviews.llvm.org/D50989 and https://reviews.llvm.org/D75494 removed the Triple support. Without recognizing Darwin triples as Mach-O, we will get assertion error in ToolChains/Darwin.h due to the universal binary mechanism. Fix llvm#47698 --- This requires fixing many misuses of llc -march= and llvm-mc -arch= ( commits 806761a and 252c423).
…/macos triples" This reverts commit 9f77fac. The change unintentionally changed lots of codegen, see llvm#47698 (comment) Also revert a follow-up: This reverts commit b40a5be.
The issue is uncovered by llvm#47698: for IR files without a target triple, -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly.
The issue is uncovered by llvm#47698: for assembly files, -triple= specifies the full target triple while -arch= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -arch= is error-prone and not recommended for tests. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly. Due to the nature of the issue, we don't see the issue in tests using architectures that any of Mach-O/COFF/XCOFF supports.
…riples The removal started at https://reviews.llvm.org/D50989 and https://reviews.llvm.org/D75494 removed the Triple support. Without recognizing Darwin triples as Mach-O, we will get assertion error in ToolChains/Darwin.h due to the universal binary mechanism. Fix llvm#47698
…/macos triples" This reverts commit 9f77fac. The change unintentionally changed lots of codegen, see llvm#47698 (comment) Also revert a follow-up: This reverts commit b40a5be.
The issue is uncovered by llvm#47698: for IR files without a target triple, -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly.
The issue is uncovered by llvm#47698: for assembly files, -triple= specifies the full target triple while -arch= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -arch= is error-prone and not recommended for tests. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly. Due to the nature of the issue, we don't see the issue in tests using architectures that any of Mach-O/COFF/XCOFF supports.
…riples The removal started at https://reviews.llvm.org/D50989 and https://reviews.llvm.org/D75494 removed the Triple support. Without recognizing Darwin triples as Mach-O, we will get assertion error in ToolChains/Darwin.h due to the universal binary mechanism. Fix llvm#47698 --- This requires fixing many misuses of llc -march= and llvm-mc -arch= ( commits 806761a and 252c423).
Extended Description
saga ~ # clang-11 -v --target=powerpc-apple-darwin8 --print-supported-cpus
clang version 11.0.0
Target: powerpc-apple-darwin8
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
(in-process)
"/usr/lib/llvm/11/bin/clang-11" -cc1 -triple powerpc-apple-darwin8 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-rounding-math -munwind-tables -faligned-alloc-unavailable -fcompatibility-qualified-id-block-type-checking -target-cpu ppc -mfloat-abi hard -fno-split-dwarf-inlining -debugger-tuning=lldb -v -resource-dir /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.0/include -internal-externc-isystem /usr/include -fdebug-compilation-dir /root -ferror-limit 19 -fblocks -fblocks-runtime-optional -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcolor-diagnostics -faddrsig -x c --print-supported-cpus
LLVM ERROR: Darwin is no longer supported for PowerPC
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang-11 -v --target=powerpc-apple-darwin8 --print-supported-cpus
#0 0x00007fc04c45e30a llvm::sys::PrintStackTrace(llvm::raw_ostream&) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/Unix/Signals.inc:568:3
#1 0x00007fc04c45c544 llvm::sys::RunSignalHandlers() /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/Signals.cpp:68:20
#2 0x00007fc04c38bad8 HandleCrash /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:77:5
#3 0x00007fc04c38bad8 CrashRecoverySignalHandler /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:382:62
#4 0x00007fc04b4ec2f0 (/lib64/libc.so.6+0x392f0)
#5 0x00007fc04b4ec271 raise /usr/src/debug/sys-libs/glibc-2.32-r3/glibc-2.32/signal/../sysdeps/unix/sysv/linux/raise.c:50:1
#6 0x00007fc04b4d5536 abort /usr/src/debug/sys-libs/glibc-2.32-r3/glibc-2.32/stdlib/abort.c:81:7
#7 0x00007fc04c39b27a llvm::raw_svector_ostream::raw_svector_ostream(llvm::SmallVectorImpl&) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/include/llvm/Support/raw_ostream.h:566:64
#8 0x00007fc04c39b27a llvm::report_fatal_error(llvm::Twine const&, bool) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/ErrorHandling.cpp:114:34
#9 0x00007fc04c39b3b5 (/usr/lib/llvm/11/bin/../lib64/libLLVM-11.so+0xa613b5)
#10 0x00007fc04e6528ac computeTargetABI /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:202:23
#11 0x00007fc04e6528ac llvm::PPCTargetMachine::PPCTargetMachine(llvm::Target const&, llvm::Triple const&, llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Optionalllvm::Reloc::Model, llvm::Optionalllvm::CodeModel::Model, llvm::CodeGenOpt::Level, bool) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:313:33
#12 0x00007fc04e652cdc llvm::RegisterTargetMachinellvm::PPCTargetMachine::Allocator(llvm::Target const&, llvm::Triple const&, llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Optionalllvm::Reloc::Model, llvm::Optionalllvm::CodeModel::Model, llvm::CodeGenOpt::Level, bool) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/include/llvm/Support/TargetRegistry.h:1121:12
#13 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_data() const /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:187:28
#14 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_is_local() const /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:222:23
#15 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_dispose() /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:231:18
#16 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string() /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:658:19
#17 0x0000560b32bd21da llvm::Triple::~Triple() /usr/lib/llvm/11/include/llvm/ADT/Triple.h:45:7
#18 0x0000560b32bd21da llvm::Target::createTargetMachine(llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Optionalllvm::Reloc::Model, llvm::Optionalllvm::CodeModel::Model, llvm::CodeGenOpt::Level, bool) const /usr/lib/llvm/11/include/llvm/Support/TargetRegistry.h:402:39
#19 0x0000560b32bd21da PrintSupportedCPUs /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/cc1_main.cpp:180:79
#20 0x0000560b32bd21da cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/cc1_main.cpp:215:30
#21 0x0000560b32bd0117 ExecuteCC1Tool /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/driver.cpp:335:34
#22 0x00007fc0525d5685 operator() /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Job.cpp:400:32
#23 0x00007fc0525d5685 callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::string*, bool*) const::<lambda()> > /usr/lib/llvm/11/include/llvm/ADT/STLExtras.h:185:52
#24 0x00007fc04c38bbe3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:420:1
#25 0x00007fc0525d78ce clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) const /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Job.cpp:404:10
#26 0x00007fc0525ab559 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Compilation.cpp:196:3
#27 0x00007fc0525abab3 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Compilation.cpp:246:5
#28 0x00007fc0525b9189 llvm::SmallVectorBase::empty() const /usr/lib/llvm/11/include/llvm/ADT/SmallVector.h:69:47
#29 0x00007fc0525b9189 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Driver.cpp:1509:28
#30 0x0000560b32bcc599 main /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/driver.cpp:502:39
#31 0x00007fc04b4d6e0a __libc_start_main /usr/src/debug/sys-libs/glibc-2.32-r3/glibc-2.32/csu/../csu/libc-start.c:314:16
#32 0x0000560b32bcd5ea _start (/usr/lib/llvm/11/bin/clang-11+0x115ea)
clang-11: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 11.0.0
Target: powerpc-apple-darwin8
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
clang-11: note: diagnostic msg: Error generating preprocessed source(s) - ignoring input from stdin.
clang-11: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
The text was updated successfully, but these errors were encountered: