[llvm-bugs] [Bug 45636] New: lld-10 (and master) crashes when uses profile data from incompatible run
https://bugs.llvm.org/show_bug.cgi?id=45636 Bug ID: 45636 Summary: lld-10 (and master) crashes when uses profile data from incompatible run Product: lld Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: ELF Assignee: unassignedb...@nondot.org Reporter: sly...@inbox.ru CC: llvm-bugs@lists.llvm.org, smithp...@googlemail.com It's an extracted version of https://bugs.gentoo.org/718632 where firefox being built under ccache causes llvm to SIGSEGV. ccache's hegative caching will be fixed in https://github.com/ccache/ccache/issues/582. LLVM's behaviour was to SIGSEGVs when using inconsistent profiling data. I think it should validate input instead and exit with error. Also reproducible on LLVM from master. Built llvm master on x86_64-pc-linux-gnu as: $ cmake -DLLVM_ENABLE_PROJECTS='llvm;lld' -DLLVM_BINUTILS_INCDIR=/usr/include -G "Unix Makefiles" ../llvm && make The crash is: + llvm_root=/home/slyfox/dev/git/llvm-project/build/ + cmd=("${llvm_root}"/bin/ld.lld --eh-frame-hdr -m elf_x86_64 -dynamic-linker ./ld-linux-x86-64.so.2 -o firefox crt1.o crti.o crtbegin.o -plugin "${llvm_root}"/lib/LLVMgold.so -plugin-opt=mcpu=x86-64 -plugin-opt=thinlto -plugin-opt=cs-profile-path=./merged.profdata nsBrowserApp.o FileUtils.o MemUtils.o nsXPCOMGlue.o SSE.o dummy.o Unified_cpp_memory_build0.o cxxalloc.o mozalloc_abort.o Unified_cpp_memory_mozalloc0.o shared-libraries-linux.o Unified_cpp_mozglue_baseprofiler0.o Unified_cpp_mozglue_baseprofiler1.o AutoProfilerLabel.o ConditionVariable_posix.o Mutex_posix.o Printf.o StackWalk.o TimeStamp.o TimeStamp_posix.o Decimal.o lz4.o lz4frame.o lz4hc.o xxhash.o Compression.o Unified_cpp_mfbt0.o Unified_cpp_mfbt1.o -L. libstdc++.so.6 libm.so.6 libc.so.6 libc_nonshared.a libgcc_s.so.1 libgcc.a crtend.o crtn.o) + /home/slyfox/dev/git/llvm-project/build//bin/ld.lld --eh-frame-hdr -m elf_x86_64 -dynamic-linker ./ld-linux-x86-64.so.2 -o firefox crt1.o crti.o crtbegin.o -plugin /home/slyfox/dev/git/llvm-project/build//lib/LLVMgold.so -plugin-opt=mcpu=x86-64 -plugin-opt=thinlto -plugin-opt=cs-profile-path=./merged.profdata nsBrowserApp.o FileUtils.o MemUtils.o nsXPCOMGlue.o SSE.o dummy.o Unified_cpp_memory_build0.o cxxalloc.o mozalloc_abort.o Unified_cpp_memory_mozalloc0.o shared-libraries-linux.o Unified_cpp_mozglue_baseprofiler0.o Unified_cpp_mozglue_baseprofiler1.o AutoProfilerLabel.o ConditionVariable_posix.o Mutex_posix.o Printf.o StackWalk.o TimeStamp.o TimeStamp_posix.o Decimal.o lz4.o lz4frame.o lz4hc.o xxhash.o Compression.o Unified_cpp_mfbt0.o Unified_cpp_mfbt1.o -L. libstdc++.so.6 libm.so.6 libc.so.6 libc_nonshared.a libgcc_s.so.1 libgcc.a crtend.o crtn.o Program aborted due to an unhandled Error: linking module flags 'ProfileSummary': IDs have conflicting values in 'Mutex_posix.o' and 'nsBrowserApp.o' PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. #0 0x5634de20c053 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/slyfox/dev/git/llvm-project/build/lib/Support/../../../llvm/lib/Support/Unix/Signals.inc:564:22 #1 0x5634de20c0e6 PrintStackTraceSignalHandler(void*) /home/slyfox/dev/git/llvm-project/build/lib/Support/../../../llvm/lib/Support/Unix/Signals.inc:625:1 #2 0x5634de209eaf llvm::sys::RunSignalHandlers() /home/slyfox/dev/git/llvm-project/build/lib/Support/../../../llvm/lib/Support/Signals.cpp:68:20 #3 0x5634de20b9e2 SignalHandler(int) /home/slyfox/dev/git/llvm-project/build/lib/Support/../../../llvm/lib/Support/Unix/Signals.inc:406:1 #4 0x7f6da3f5e0d0 __restore_rt (/lib64/libpthread.so.0+0x130d0) #5 0x7f6da3832c41 raise /usr/src/debug/sys-libs/glibc-2.31-r2/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1 #6 0x7f6da381c537 abort /usr/src/debug/sys-libs/glibc-2.31-r2/glibc-2.31/stdlib/abort.c:81:7 #7 0x5634de19665d /home/slyfox/dev/git/llvm-project/build/lib/Support/../../../llvm/lib/Support/Error.cpp:112:8 #8 0x5634de1792ca llvm::Error::assertIsChecked() /home/slyfox/dev/git/llvm-project/build/lib/Support/../../../llvm/include/llvm/Support/Error.h:269:3 #9 0x5634de179200 llvm::Error::~Error() /home/slyfox/dev/git/llvm-project/build/lib/Support/../../../llvm/include/llvm/Support/Error.h:229:18 #10 0x5634e0c6bc95 llvm::FunctionImporter::importFunctions(llvm::Module&, llvm::StringMap, std::equal_to, std::allocator >, llvm::MallocAllocator> const&) /home/slyfox/dev/git/llvm-project/build/lib/Transforms/IPO/../../../../llvm/lib/Transforms/IPO/FunctionImport.cpp:1246:19 #11 0x5634e04b7715 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function > (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap, std::equal_to, std::allocator >, llvm::MallocAllocator> const&, llvm::DenseMap, llvm::detail::DenseMapPair >
[llvm-bugs] [Bug 45637] New: [flang] Build fails with gcc-10
https://bugs.llvm.org/show_bug.cgi?id=45637 Bug ID: 45637 Summary: [flang] Build fails with gcc-10 Product: flang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Build System Assignee: unassignedb...@nondot.org Reporter: chinoune.me...@hotmail.com CC: david.tr...@arm.com, jper...@nvidia.com, llvm-bugs@lists.llvm.org, sscalp...@nvidia.com I got these error messages when trying to build flang with gcc-10: In file included from /home/runner/work/llvm-project/llvm-project/flang/lib/Parser/Fortran-parsers.cpp:38: /home/runner/work/llvm-project/llvm-project/flang/lib/Parser/Fortran-parsers.cpp: In static member function `static std::optional<_Tp> Fortran::parser::Parser::Parse(Fortran::parser::ParseState&) [with A = Fortran::parser::ProcComponentDefStmt]`: /home/runner/work/llvm-project/llvm-project/flang/lib/Parser/Fortran-parsers.cpp:447:1: in `constexpr` expansion of `Fortran::parser::localRecovery(Fortran::parser::MessageFixedText, PA, PB) [with PA = Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > >; PB = Fortran::parser::SkipTo<'\012'>](Fortran::parser::operator>>, Fortran::parser::TokenStringMatch<> > >(((const char*)"::"), Fortran::parser::nonemptyList >(Fortran::parser::procDecl)), Fortran::parser::SkipTo<'\012'>())` /home/runner/work/llvm-project/llvm-project/flang/lib/Parser/basic-parsers.h:812:18: in `constexpr` expansion of `Fortran::parser::recovery(PA, PB) [with PA = Fortran::parser::WithMessageParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > >; PB = Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > >](Fortran::parser::operator>>(PA, PB) [with PA = Fortran::parser::SkipTo<'\012'>; PB = Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > >](Fortran::parser::defaulted, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > >(Fortran::parser::operator>>, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > >((Fortran::parser::cut, const Fortran::parser::FixedParser()), pa` /home/runner/work/llvm-project/llvm-project/flang/lib/Parser/basic-parsers.h:391:39: in `constexpr` expansion of `Fortran::parser::RecoveryParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > >, Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > > >(pa, Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > >(pb))` /home/runner/work/llvm-project/llvm-project/flang/lib/Parser/basic-parsers.h:339:59: in `constexpr` expansion of `((Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > >*)(&((Fortran::parser::RecoveryParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > >, Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > > >*)this)->Fortran::parser::RecoveryParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > >, Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > > >::pb_))->Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > >::SequenceParser(pb)` /home/runner/work/llvm-project/llvm-project/flang/lib/Parser/basic-parsers.h:241:13: in `constexpr` expansion of `((Fortran::parser::SkipTo<'\012'>*)(&((Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > >*)this)->Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySeparated, Fortran::parser::TokenStringMatch<> > > > > >::pa_))->Fortran::parser::SkipTo<'\012'>::SkipTo(.Fortran::parser::SequenceParser, Fortran::parser::DefaultedParser, Fortran::parser::SequenceParser, Fortran::parser::NonemptySepar
[llvm-bugs] Issue 21827 in oss-fuzz: llvm:clang-objc-fuzzer: ASSERT: getValueKind() == VK_RValue
Status: New Owner: CC: k...@google.com, masc...@google.com, jdevlieg...@apple.com, igm...@gmail.com, d...@google.com, mit...@google.com, bigchees...@gmail.com, eney...@google.com, llvm-b...@lists.llvm.org, j...@chromium.org, v...@apple.com, mitchphi...@outlook.com, xpl...@gmail.com, akils...@apple.com Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible Engine-libfuzzer OS-Linux Proj-llvm Reported-2020-04-22 Type: Bug New issue 21827 by ClusterFuzz-External: llvm:clang-objc-fuzzer: ASSERT: getValueKind() == VK_RValue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21827 Detailed Report: https://oss-fuzz.com/testcase?key=5690768842031104 Project: llvm Fuzzing Engine: libFuzzer Fuzz Target: clang-objc-fuzzer Job Type: libfuzzer_asan_llvm Platform Id: linux Crash Type: ASSERT Crash Address: Crash State: getValueKind() == VK_RValue clang::Expr::ClassifyImpl clang::Expr::isModifiableLvalue Sanitizer: address (ASAN) Regressed: https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201911200438:201911230451 Reproducer Testcase: https://oss-fuzz.com/download?testcase_id=5690768842031104 Issue filed automatically. See https://google.github.io/oss-fuzz/advanced-topics/reproducing for instructions to reproduce this bug locally. When you fix this bug, please * mention the fix revision(s). * state whether the bug was a short-lived regression or an old bug in any stable releases. * add any other useful information. This information can help downstream consumers. If you need to contact the OSS-Fuzz team with a question, concern, or any other feedback, please file an issue at https://github.com/google/oss-fuzz/issues. Comments on individual Monorail issues are not monitored. -- You received this message because: 1. You were specifically CC'd on the issue You may adjust your notification preferences at: https://bugs.chromium.org/hosting/settings Reply to this email to add a comment.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45623] FixIrreducible crashes with: Assertion `I != SubLoops.end() && "Cannot remove end iterator!"' failed.
https://bugs.llvm.org/show_bug.cgi?id=45623 Sameer Sahasrabuddhe changed: What|Removed |Added Fixed By Commit(s)||5a7a6382bc066b93cdd4c60a489 ||b480d0e74a254 Status|CONFIRMED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45638] New: Faild to build latest edk2 aarch64 target after llvm 9
https://bugs.llvm.org/show_bug.cgi?id=45638 Bug ID: 45638 Summary: Faild to build latest edk2 aarch64 target after llvm 9 Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: LLVM Codegen Assignee: unassignedclangb...@nondot.org Reporter: squall...@gmail.com CC: llvm-bugs@lists.llvm.org, neeil...@live.com, richard-l...@metafoo.co.uk LLVM ERROR: Cannot select: 0xd4b1cb0: v8i16 = insert_vector_elt 0xcf47590, 0xcf47db0, Constant:i64<0>, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:101:1 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] 0xcf47590: v8i16 = insert_subvector undef:v8i16, 0xcf473f0, Constant:i32<0>, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:101:1 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] 0xde9f3f0: v8i16 = undef 0xcf473f0: v4i16 = AArch64ISD::NVCAST 0xcf47458, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:101:1 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] 0xcf47458: f64 = AArch64ISD::MOVIedit Constant:i32<0>, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:101:1 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] 0xcf474c0: i32 = Constant<0> 0xcf474c0: i32 = Constant<0> 0xcf47db0: i16 = and 0xd4b1838, Constant:i16<255>, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:101:1 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] 0xd4b1838: i16 = truncate 0xcf22170, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:101:1 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] 0xcf22170: i64,ch,glue = CopyFromReg 0xcf215a8, Register:i64 $x0, 0xcf215a8:1, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:44:26 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:85:13 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] ] 0xcf21dc8: i64 = Register $x0 0xcf215a8: ch,glue = callseq_end 0xd4b1490, TargetConstant:i64<0>, TargetConstant:i64<0>, 0xd4b1490:1, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:44:26 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:85:13 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] ] 0xcf47e18: i64 = TargetConstant<0> 0xcf47e18: i64 = TargetConstant<0> 0xd4b1490: ch,glue = AArch64ISD::CALL 0xcf46fe0, TargetGlobalAddress:i64 0, RegisterMask:Untyped, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:44:26 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:85:13 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] ] 0xcf224b0: i64 = TargetGlobalAddress 0, edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:44:26 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:85:13 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:148:11 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:0 @[ edk2/CryptoPkg/Library/OpensslLib/rand_pool.c:241:13 @[ edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/rand/rand_lib.c:198:29 ] ] ] ] ] 0xd4b1e50: Untyped = RegisterMask 0xde9fa08: i16 = Constant<255> 0xcf479a0: i64 = Constant<0> In function: rand_drbg_get_entropy clang-10: error: linker command failed with exit code 1 (use -v to see invocation) clang-8 can build succes
[llvm-bugs] [Bug 45635] InstCombine propagates values across omp barrier, after D75010
https://bugs.llvm.org/show_bug.cgi?id=45635 Johannes Doerfert changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Johannes Doerfert --- My bad. In the review I was already suspicious but I somehow thought it was OK or I forgot about the concerns. Either way, fixed with 72a9e7c926f4e32f209e528ec407fe526da5587e. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45639] New: clang-format splits up the brackets of C++17 attribute [[ ]] with PenaltyExcessCharacter
https://bugs.llvm.org/show_bug.cgi?id=45639 Bug ID: 45639 Summary: clang-format splits up the brackets of C++17 attribute [[ ]] with PenaltyExcessCharacter Product: clang Version: 10.0 Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Formatter Assignee: unassignedclangb...@nondot.org Reporter: rej...@microsoft.com CC: djas...@google.com, job...@microsoft.com, kli...@google.com, llvm-bugs@lists.llvm.org I've tried to simplify this down as much as I can: test.cpp: ``` void SomeLongClassName::ALongMethodNameInThatClass([[maybe_unused]] const shared_ptr& argumentNameForThat LongType) { } ``` .clang-format: ``` Standard: c++17 PenaltyExcessCharacter: 10 ``` clang-format.exe -style=file test.cpp: ``` void SomeLongClassName::ALongMethodNameInThatClass([ [maybe_unused]] const shared_ptr &argumentNameForThatLongType) { } ``` Note how the first [ of [[maybe_unused]] separated from the rest. I would expect the entirety of [[maybe_unused]] to be together. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] Cannot build with latest LLVM
Hi, I just did an llvm build from source and here's what I hit. I am trying to build projects "mlir;clang;openmp;flang". Steps Followed: - git clone https://github.com/llvm/llvm-project.git - cmake -DLLVM_ENABLE_PROJECTS="mlir;clang;openmp;flang" -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ -G "Unix Makefiles" -DLLVM_USE_LINKER=gold -DCMAKE_BUILD_TYPE=Debug ../llvm/ - make [root@localhost build]# /usr/local/bin/g++ -v Using built-in specs. COLLECT_GCC=/usr/local/bin/g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ./configure --disable-multilib --enable-languages=c,c++,fortran Thread model: posix gcc version 7.3.0 (GCC) [root@localhost build]# /usr/local/bin/gcc -v Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ./configure --disable-multilib --enable-languages=c,c++,fortran Thread model: posix gcc version 7.3.0 (GCC) [root@localhost build]# Scanning dependencies of target MLIRAnalysis [ 71%] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/CallGraph.cpp.o [ 71%] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/Liveness.cpp.o [ 71%] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/SliceAnalysis.cpp.o [ 71%] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/Dominance.cpp.o In file included from /root/LLVM/llvm-project-new/llvm-project/llvm/include/llvm/ADT/STLExtras.h:20:0, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/Support/STLExtras.h:18, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:17, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/TypeSupport.h:17, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/Types.h:12, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/Value.h:16, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/BlockSupport.h:16, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/Block.h:16, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/Region.h:16, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/IR/RegionGraphTraits.h:18, from /root/LLVM/llvm-project-new/llvm-project/mlir/include/mlir/Analysis/Dominance.h:12, from /root/LLVM/llvm-project-new/llvm-project/mlir/lib/Analysis/Dominance.cpp:14: /root/LLVM/llvm-project-new/llvm-project/llvm/include/llvm/ADT/iterator.h: In instantiation of ‘NodeRef& llvm::WrappedPairNodeDataIterator::operator*() const [with ItType = mlir::PredecessorIterator; NodeRef = std::pair*, mlir::Block*>; DataRef = const llvm::GraphDiff*]’: /root/LLVM/llvm-project-new/llvm-project/llvm/include/llvm/ADT/STLExtras.h:315:36: required from ‘void llvm::filter_iterator_base::findNextValid() [with WrappedIteratorT = llvm::WrappedPairNodeDataIterator*, mlir::Block*>, const llvm::GraphDiff*>; PredicateT = llvm::CFGViewChildren::children(llvm::CFGViewChildren::NodeRef) [with GraphT = llvm::Inverse; bool InverseGraph = true; bool InverseEdge = true; GT = llvm::GraphTraits >; llvm::CFGViewChildren::NodeRef = std::pair*, mlir::Block*>; typename GT::NodeRef = mlir::Block*]::, true, true, llvm::GraphTraits > >::NodeRef)>; IterTag = std::forward_iterator_tag]’ /root/LLVM/llvm-project-new/llvm-project/llvm/include/llvm/ADT/STLExtras.h:325:18: required from ‘llvm::filter_iterator_base::filter_iterator_base(WrappedIteratorT, WrappedIteratorT, PredicateT) [with WrappedIteratorT = llvm::WrappedPairNodeDataIterator*, mlir::Block*>, const llvm::GraphDiff*>; PredicateT = llvm::CFGViewChildren::children(llvm::CFGViewChildren::NodeRef) [with GraphT = llvm::Inverse; bool InverseGraph = true; bool InverseEdge = true; GT = llvm::GraphTraits >; llvm::CFGViewChildren::NodeRef = std::pair*, mlir::Block*>; typename GT::NodeRef = mlir::Block*]::, true, true, llvm::GraphTraits > >::NodeRef)>; IterTag = std::forward_iterator_tag]’ /root/LLVM/llvm-project-new/llvm-project/llvm/include/llvm/ADT/STLExtras.h:348:31: required from ‘llvm::filter_iterator_impl::filter_iterator_impl(WrappedIteratorT, WrappedIteratorT, PredicateT) [with WrappedIteratorT = llvm::WrappedPairNodeDataIterator*, mlir::Block*>, const llvm::GraphDiff*>; PredicateT = llvm::CFGViewChildren::children(llvm::CFGViewChildren::NodeRef) [with GraphT = llvm::Inverse; bool InverseGraph = true; bool InverseEdge = true; GT = llvm::GraphTraits >; llvm::CFGViewChildren::NodeRef = std::pair*, mlir::Block*>; typename GT::NodeRef = mlir::Block*]::, true, true, llvm::GraphTraits > >::NodeRef)>; IterTag = std::forward_iterator_tag]’ /root/LLVM/llvm-pro
[llvm-bugs] [Bug 45640] New: Incorrect default C++ standard listed on website
https://bugs.llvm.org/show_bug.cgi?id=45640 Bug ID: 45640 Summary: Incorrect default C++ standard listed on website Product: Documentation Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: General docs Assignee: unassignedb...@nondot.org Reporter: da...@doublewise.net CC: llvm-bugs@lists.llvm.org https://clang.llvm.org/cxx_status.html states: "By default, Clang builds C++ code according to the C++98 standard, with many C++11 features accepted as extensions.". Since LLVM 6.0, the default version has been gnu++14 (not sure if any newer versions have updated to gnu++17). -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45467] vfmaq_lane_f16 generates a dup
https://bugs.llvm.org/show_bug.cgi?id=45467 Pavel Iliin changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #5 from Pavel Iliin --- Patch landed upstream. Code for inner loop in question ldr d4, [x3], #8 ldr d5, [x13], #8 ldr d6, [x14], #8 ldr d7, [x15], #8 ldp q16, q17, [x5] sub x16, x16, #8// =8 cmp x16, #7 // =7 fmlav0.8h, v16.8h, v4.h[0] fmlav3.8h, v16.8h, v5.h[0] fmlav2.8h, v16.8h, v6.h[0] fmlav1.8h, v16.8h, v7.h[0] fmlav0.8h, v17.8h, v4.h[1] fmlav3.8h, v17.8h, v5.h[1] fmlav2.8h, v17.8h, v6.h[1] fmlav1.8h, v17.8h, v7.h[1] ldp q16, q17, [x5, #32] add x5, x5, #64 // =64 fmlav0.8h, v16.8h, v4.h[2] fmlav3.8h, v16.8h, v5.h[2] fmlav2.8h, v16.8h, v6.h[2] fmlav1.8h, v16.8h, v7.h[2] fmlav0.8h, v17.8h, v4.h[3] fmlav3.8h, v17.8h, v5.h[3] fmlav2.8h, v17.8h, v6.h[3] fmlav1.8h, v17.8h, v7.h[3] b.hi.LBB0_3 -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 38138] libc++'s ABI depends on optimization flags
https://bugs.llvm.org/show_bug.cgi?id=38138 Louis Dionne changed: What|Removed |Added Fixed By Commit(s)||8a033a9e3fb96b9a1099325c4cd ||218c1c979d9d9 Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Louis Dionne --- Indeed, this seems to have been fixed now. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45309] [meta] 10.0.1 Release Blockers
https://bugs.llvm.org/show_bug.cgi?id=45309 Bug 45309 depends on bug 45297, which changed state. Bug 45297 Summary: Crash when building Linux kernel's AMDGPU driver for powerpc64le https://bugs.llvm.org/show_bug.cgi?id=45297 What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 4068] [Meta] Compiling the Linux kernel with clang
https://bugs.llvm.org/show_bug.cgi?id=4068 Bug 4068 depends on bug 45297, which changed state. Bug 45297 Summary: Crash when building Linux kernel's AMDGPU driver for powerpc64le https://bugs.llvm.org/show_bug.cgi?id=45297 What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45297] Crash when building Linux kernel's AMDGPU driver for powerpc64le
https://bugs.llvm.org/show_bug.cgi?id=45297 Tom Stellard changed: What|Removed |Added Fixed By Commit(s)|b7d5229d789b7cb2747226d528e |b7d5229d789b7cb2747226d528e |d016624b11cea 70f9f4dd9d1 |d016624b11cea 70f9f4dd9d1 |351b1923155 26b46b67d80 |351b1923155 26b46b67d80 |8eb40e41f6e |8eb40e41f6e |92d5c1be9ee93850c0a8903f05f |92d5c1be9ee93850c0a8903f05f |36a23ee835dc2 |36a23ee835dc2 5086fa03334 ||40633cc752a 66cfbf17a18 ||b11ecd19654 Resolution|--- |FIXED Status|REOPENED|RESOLVED --- Comment #28 from Tom Stellard --- Merged: b11ecd19654 -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45642] New: Step over misbehaves with multiple threads on Linux
https://bugs.llvm.org/show_bug.cgi?id=45642 Bug ID: 45642 Summary: Step over misbehaves with multiple threads on Linux Product: lldb Version: 10.0 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-...@lists.llvm.org Reporter: ja...@google.com CC: jdevliegh...@apple.com, llvm-bugs@lists.llvm.org Stepping over a line can report a spurious SIGTRAP when the thread hits a real (public) breakpoint while another thread hits the step-over plan's private breakpoint. A repro is shown below (it is not 100% deterministic, but seems to repro in more than 50% of cases). We have two threads; with one thread, we step over a function call and hits a public breakpoint there, the other thread hits a private breakpoint that was placed by the first thread's step-over plan (more precisely, by its step-out child plan). When the debugger stops, it selects that thread that hit the private breakpoint and confusingly reports SIGTRAP. The repro console session: $ cat u.cc #include void g() { printf("."); } void f() { while (true) { g(); // Break here, continue, then step over twice. } } int main() { std::thread t1(f); std::thread t2(f); t1.join(); t2.join(); return 0; } $ clang++ -O0 -g -pthread u.cc $ lldb --version lldb version 11.0.0 clang revision cfd235e6fc7a2306644ee63bfea310d79084ef66 llvm revision cfd235e6fc7a2306644ee63bfea310d79084ef66 $ lldb a.out (lldb) target create "a.out" Current executable set to 'a.out' (x86_64). (lldb) b u.cc:9 Breakpoint 1: where = a.out`f() + 9 at u.cc:9:5, address = 0x004011f9 (lldb) r Process 229470 launched: 'a.out' (x86_64) Process 229470 stopped * thread #2, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x004011f9 a.out`f() at u.cc:9:5 6 7void f() { 8 while (true) { -> 9g(); // Break here, then step over. 10 } 11 } 12 (lldb) c Process 229470 resuming Process 229470 stopped * thread #3, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x004011f9 a.out`f() at u.cc:9:5 6 7void f() { 8 while (true) { -> 9g(); // Break here, then step over. 10 } 11 } 12 (lldb) n Process 229470 stopped * thread #3, name = 'a.out', stop reason = step over frame #0: 0x004011fe a.out`f() at u.cc:8:3 5} 6 7void f() { -> 8 while (true) { 9g(); // Break here, then step over. 10 } 11 } (lldb) n Process 229470 stopped * thread #2, name = 'a.out', stop reason = signal SIGTRAP frame #0: 0x004011fe a.out`f() at u.cc:8:3 5} 6 7void f() { -> 8 while (true) { 9g(); // Break here, then step over. 10 } 11 } thread #3, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x004011f9 a.out`f() at u.cc:9:5 6 7void f() { 8 while (true) { -> 9g(); // Break here, then step over. 10 } 11 } 12 There is also a related problem where step-over seemingly steps into a function. This happens when another thread hits a public breakpoint at the same time as the step over plan single-steps. $ lldb a.out (lldb) target create "a.out" Current executable set to 'a.out' (x86_64). (lldb) b t.cc:9 Breakpoint 1: where = a.out`f() + 9 at t.cc:9:5, address = 0x00401209 (lldb) r Process 193890 launched: 'jarin/a.out' (x86_64) Process 193890 stopped * thread #2, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x00401209 a.out`f() at t.cc:9:5 6 7void f() { 8 while (true) { -> 9g(); 10 } 11 } 12 (lldb) n Process 193890 stopped * thread #2, name = 'a.out', stop reason = step over frame #0: 0x0040120e a.out`f() at t.cc:8:3 5} 6 7void f() { -> 8 while (true) { 9g(); 10 } 11 } thread #3, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x00401209 a.out`f() at t.cc:9:5 6 7void f() { 8 while (true) { -> 9g(); 10 } 11 } 12 (lldb) n Process 193890 stopped * thread #2, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x00401209 a.out`f() at t.cc:9:5 6 7void f() { 8 while (true) { -> 9g(); 10 } 11 } 12 thread #3, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x00401209 a.out`f() at t.cc:9:5 6 7void f() { 8 while (true) { -> 9g(); 10 } 11 } 12 (lldb) Process 193890 stopped * thread #2, name = 'a.out', stop reason = step over frame #0: 0x0040120e a.out`f() at t.cc:8:3 5} 6 7void f() { -> 8 while (true) { 9g(); 10 } 11 } (
[llvm-bugs] [Bug 4068] [Meta] Compiling the Linux kernel with clang
https://bugs.llvm.org/show_bug.cgi?id=4068 Bug 4068 depends on bug 45568, which changed state. Bug 45568 Summary: Crash in pass "Simple Register Coalescing" when building Linux kernel's powerpc allyesconfig https://bugs.llvm.org/show_bug.cgi?id=45568 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45568] Crash in pass "Simple Register Coalescing" when building Linux kernel's powerpc allyesconfig
https://bugs.llvm.org/show_bug.cgi?id=45568 Nathan Chancellor changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Nathan Chancellor --- Thanks for looking into it! I can confirm that this appears resolved for me at 6235951ec0d9df0227c5a247fb2c90ffe9a44c5a. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45644] New: [AArch64] vcombine with zero missed optimization
https://bugs.llvm.org/show_bug.cgi?id=45644 Bug ID: 45644 Summary: [AArch64] vcombine with zero missed optimization Product: libraries Version: 9.0 Hardware: Other OS: Linux Status: NEW Severity: enhancement Priority: P Component: Backend: AArch64 Assignee: unassignedb...@nondot.org Reporter: husseyde...@gmail.com CC: arnaud.degrandmai...@arm.com, llvm-bugs@lists.llvm.org, smithp...@googlemail.com, ties.st...@arm.com aarch64 zero extends any writes to D registers. One pattern that should be recognized is vcombine(x, 0). In LLVM IR, this shows up as shufflevector <1 x i64> %x, <1 x i64> zeroinitializer, <2 x i32> This shouldn't do anything as long as the register was explicitly written to (e.g. not vcombine(vget_low(x), 0)). So for example: uint64x2_t _mm_cvtsi64_si128(uint64_t x) { return vcombine_u64(vdup_n_u64(x), vdup_n_u64(0)); } define <2 x i64> @_mm_cvtsi64_si128(i64 %x) { %vdup = insertelement <1 x i64> undef, i64 %x, i32 0 %vcombine = shufflevector <1 x i64> %vdup, <1 x i64> zeroinitializer, <2 x i32> ret <2 x i64> %vcombine } The most optimal code would be this, and is what is generated by GCC 9.2.0 or when doing a uint64x1_t: _mm_cvtsi64_si128: fmovd0, x0 ret However, Clang generates this: _mm_cvtsi64_si128: moviv0.2d, # mov v0.d[0], x0 ret Similarly, for vectors: uint32x4_t vaddq_low_u32(uint32x4_t a, uint32x2_t b) { return vaddq_u32(a, vcombine_u32(b, vdup_n_u32(0)); } Expected: vaddq_low_u32: mov v1.2s, v1.2s // zero extend add v0.4s, v0.4s, v1.4s ret Actual: vaddq_low_u32: moviv2.2d, # mov v1.d[1], v2.d[0] add v0.4s, v0.4s, v1.4s ret As hinted by the function name, this pattern is recognized on the x86_64 backend, as when the IR is compiled for x86_64 -O3, we get the direct equivalent. _mm_cvtsi64_si128: movqxmm0, rdi ret Although it doesn't get the second example and does this instead of movq xmm1, xmm1: vaddq_low_u32: xorpsxmm2, xmm2 shufps xmm1, xmm2, 232 paddqxmm0, xmm1 ret That's a different issue though, but would follow the same logic. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 45000] In CodeGen::CodeGenFunction::EmitCallArgs: Assertion `[...] && "type mismatch in call argument!"' failed
https://bugs.llvm.org/show_bug.cgi?id=45000 Martin Storsjö changed: What|Removed |Added Resolution|--- |FIXED Status|CONFIRMED |RESOLVED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs