[llvm-bugs] [Bug 45426] New: Assertion `getNumOperands() == 2 && "Must be binary operator?"' failed
https://bugs.llvm.org/show_bug.cgi?id=45426 Bug ID: 45426 Summary: Assertion `getNumOperands() == 2 && "Must be binary operator?"' failed Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C Assignee: unassignedclangb...@nondot.org Reporter: balarishi.bhog...@amd.com CC: blitzrak...@gmail.com, dgre...@apple.com, erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk The below issue was not seen before October, 2019. $ cat test.c int a[], b; float *c; int main() { return -(*c = &b != a); } $ clang -c test.c test.c:1:5: warning: tentative array definition assumed to have one element int a[], b; ^ clang: /home/compiler/llvm-project/llvm/lib/IR/Constants.cpp:1365: llvm::Constant* llvm::ConstantExpr::getWithOperands(llvm::ArrayRef, llvm::Type*, bool, llvm::Type*) const: Assertion `getNumOperands() == 2 && "Must be binary operator?"' failed. -- 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 44191] git-based snapshot versioning is incorect
https://bugs.llvm.org/show_bug.cgi?id=44191 Roman Lebedev changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED --- Comment #3 from Roman Lebedev --- dpkg: warning: downgrading clang-11 from 1:11~++2020040325+c7e1fc8496d-1~exp1~20200403091720.3153 to 1:11~++20200403100632+6f8c45067b1-1~exp1~20200403201300.3154 Preparing to unpack .../04-clang-11_1%3a11~++20200403100632+6f8c45067b1-1~exp1~20200403201300.3154_amd64.deb ... Unpacking clang-11 (1:11~++20200403100632+6f8c45067b1-1~exp1~20200403201300.3154) over (1:11~++2020040325+c7e1fc8496d-1~exp1~20200403091720.3153) ... -- 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 43979] PowerPC64: clang crash while building commoncpp
https://bugs.llvm.org/show_bug.cgi?id=43979 Piotr Kubaj changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #1 from Piotr Kubaj --- Doesn't happen on 10.0.0. -- 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 45428] New: [clangd] macro definition causes clangd to assert
https://bugs.llvm.org/show_bug.cgi?id=45428 Bug ID: 45428 Summary: [clangd] macro definition causes clangd to assert Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Tooling Assignee: unassignedclangb...@nondot.org Reporter: vince.a.bridg...@gmail.com CC: llvm-bugs@lists.llvm.org I came across a case in proprietary source code that causes clangd to assert, and distilled the problem into a a very simple test case that can be applied to clang/unittests/Tooling/Syntax/TokensTest.cpp. I bisected the source tree, and the assert started appearing at git sha "5e69f27ef7086287519d0c04192108d322bd6e82 - [Syntax] Do not glue multiple empty PP expansions to a single mapping". There is a comment in that patch that appears suspicious ... clang/include/clang/Tooling/Syntax/Tokens.h ~L160: +/// FIXME: allow mappings into macro arguments. Maybe related? Ilya, could you have a look at this when you get a chance? Thanks - Vince The macro test case is: #define N 42 #define M2(a1,...) {__VA_ARGS__;} #define M1(a2,...) M2(a2,__VA_ARGS__)) #define M0 M1 M0(0,N); Simple patch ... diff --git a/clang/unittests/Tooling/Syntax/TokensTest.cpp b/clang/unittests/Tooling/Syntax/TokensTest.cpp index 256096d..e924dea 100644 --- a/clang/unittests/Tooling/Syntax/TokensTest.cpp +++ b/clang/unittests/Tooling/Syntax/TokensTest.cpp @@ -484,6 +484,21 @@ file './input.cpp' ['EMPTY'_9, 'EMPTY_FUNC'_10) => [''_0, ''_0) ['EMPTY_FUNC'_10, ''_18) => [''_0, ''_0) )"}, + // New issue: Should not crash. + // Verification portion of this TBD + {R"cpp( +#define N 42 +#define M2(a1,...) {__VA_ARGS__;} +#define M1(a2,...) M2(a2,__VA_ARGS__)) +#define M0 M1 +M0(0,N); +)cpp", + R"(expanded tokens: + +file './input.cpp' + spelled tokens: + mappings: +)"}, // File ends with a macro replacement. {R"cpp( #define FOO 10+10; Obfuscated debug output and assertion message... Trying /repo/einvbri/clangd-repro/.clang-format... Trying /repo/einvbri/clangd-repro/_clang-format... Trying /repo/einvbri/.clang-format... Trying /repo/einvbri/_clang-format... Trying /repo/.clang-format... Trying /repo/_clang-format... Trying /.clang-format... Trying /_clang-format... Token: Token(`void`, void, length = 4) Token: Token(`foo`, identifier, length = 3) Token: Token(`(`, l_paren, length = 1) Token: Token(`void`, void, length = 4) Token: Token(`)`, r_paren, length = 1) Token: Token(`{`, l_brace, length = 1) Token: Token(`{`, l_brace, length = 1) Token: Token(`42`, numeric_constant, length = 2) Token: Token(`;`, semi, length = 1) Token: Token(`}`, r_brace, length = 1) Token: Token(`)`, r_paren, length = 1) Token: Token(`;`, semi, length = 1) Token: Token(`}`, r_brace, length = 1) Token: Token(``, eof, length = 0) clangd: /llvm/clang/lib/Tooling/Syntax/Tokens.cpp:620: void clang::syntax::TokenCollector::Builder::consumeMapping(clang::syntax::TokenBuffer::MarkedFile&, unsigned int, unsigned int, unsigned int, unsigned int&): Assertion `!HitMapping && "recursive macro expansion?"' failed. -- 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] Issue 21573 in oss-fuzz: llvm:clang-fuzzer: Stack-overflow in clang::DiagnosticIDs::isUnrecoverable
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-04 Type: Bug New issue 21573 by ClusterFuzz-External: llvm:clang-fuzzer: Stack-overflow in clang::DiagnosticIDs::isUnrecoverable https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21573 Detailed Report: https://oss-fuzz.com/testcase?key=5686021611323392 Project: llvm Fuzzing Engine: libFuzzer Fuzz Target: clang-fuzzer Job Type: libfuzzer_asan_llvm Platform Id: linux Crash Type: Stack-overflow Crash Address: 0x7ffe84f70b58 Crash State: clang::DiagnosticIDs::isUnrecoverable clang::DiagnosticIDs::ProcessDiag clang::DiagnosticsEngine::EmitCurrentDiagnostic Sanitizer: address (ASAN) Regressed: https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201806180729:201806182117 Reproducer Testcase: https://oss-fuzz.com/download?testcase_id=5686021611323392 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 45429] New: Boost Log crashes with libc++
https://bugs.llvm.org/show_bug.cgi?id=45429 Bug ID: 45429 Summary: Boost Log crashes with libc++ Product: libc++ Version: 10.0 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: joe.sil...@gmail.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Created attachment 23310 --> https://bugs.llvm.org/attachment.cgi?id=23310&action=edit coredump I'm not entirely sure if this is a bug in libc++. However it doesn't show up with GNU libstdc++ (whether compiled with g++ or clang++) If I try to run this very simple program: #include int main(int, char*[]) { BOOST_LOG_TRIVIAL(trace) << "Hello World!"; return 0; } It crashes with: malloc(): invalid next size (unsorted) Aborted (core dumped) The coredump is: malloc(): invalid next size (unsorted) Aborted (core dumped) -- 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] Issue 18256 in oss-fuzz: llvm:clang-fuzzer: Stack-overflow in Evaluate
Updates: Labels: ClusterFuzz-Verified Status: Verified Comment #3 on issue 18256 by ClusterFuzz-External: llvm:clang-fuzzer: Stack-overflow in Evaluate https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18256#c3 ClusterFuzz testcase 5701463757553664 is verified as fixed in https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202004030252:202004040256 If this is incorrect, please file a bug on https://github.com/google/oss-fuzz/issues/new -- 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 45049] Segfault in SelectionDAG::LegalizeTypes when compiling optimized IR.
https://bugs.llvm.org/show_bug.cgi?id=45049 Jonathan Roelofs changed: What|Removed |Added Resolution|--- |FIXED Status|CONFIRMED |RESOLVED --- Comment #9 from Jonathan Roelofs --- https://github.com/llvm/llvm-project/commit/17673ae0b2cbf8d48973b673d413fb8591d8aae7 -- 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 45430] New: ppc_fp128 math causes: Assertion failed: (!carry), function addOrSubtractSignificand
https://bugs.llvm.org/show_bug.cgi?id=45430 Bug ID: 45430 Summary: ppc_fp128 math causes: Assertion failed: (!carry), function addOrSubtractSignificand Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Core LLVM classes Assignee: unassignedb...@nondot.org Reporter: florian_h...@apple.com CC: llvm-bugs@lists.llvm.org The code below causes LLVM to crash when running opt -instcombine with the trace below define ppc_fp128 @bitcast_bitcast_s_s_s() { %B2 = fadd ppc_fp128 0xM0001, 0xM0001 %B16 = fmul ppc_fp128 %B2, 0xM7FEF7C8E %B10 = fadd ppc_fp128 %B2, 0xM0001 %B27 = fdiv ppc_fp128 %B10, %B16 %B11 = fadd ppc_fp128 %B27, %B2 %B1 = fdiv ppc_fp128 %B2, 0xM0001 %B14 = fdiv ppc_fp128 %B11, %B16 %B4 = fdiv ppc_fp128 %B2, %B1 %B12 = fsub ppc_fp128 0xM, %B14 %B8 = fsub ppc_fp128 0xM, %B12 %B6 = frem ppc_fp128 %B1, %B12 %B18 = fsub ppc_fp128 0xM, %B6 %B9 = frem ppc_fp128 %B8, %B18 %B22 = fdiv ppc_fp128 %B4, %B9 %B5 = fmul ppc_fp128 %B22, %B9 ret ppc_fp128 %B5 } Assertion failed: (!carry), function addOrSubtractSignificand, file llvm-project/llvm/lib/Support/APFloat.cpp, line 1540. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: bin/opt -instcombine bugpoint-reduced-simplified.ll 1. Running pass 'Function Pass Manager' on module 'bugpoint-reduced-simplified.ll'. 2. Running pass 'Combine redundant instructions' on function '@bitcast_bitcast_s_s_s' 0 opt 0x00010b2c2b35 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37 1 opt 0x00010b2c1948 llvm::sys::RunSignalHandlers() + 248 2 opt 0x00010b2c3126 SignalHandler(int) + 262 3 libsystem_platform.dylib 0x7fff6e0d85fd _sigtramp + 29 4 libsystem_platform.dylib 00 _sigtramp + 18446603338669783584 5 libsystem_c.dylib0x7fff6dfae808 abort + 120 6 libsystem_c.dylib0x7fff6dfadac6 err + 0 7 opt 0x00010c545be3 llvm::detail::IEEEFloat::addOrSubtractSignificand(llvm::detail::IEEEFloat const&, bool) (.cold.3) + 35 8 opt 0x00010b1d1c90 llvm::detail::IEEEFloat::addOrSubtractSignificand(llvm::detail::IEEEFloat const&, bool) + 1296 9 opt 0x00010b1d117d llvm::detail::IEEEFloat::multiplySignificand(llvm::detail::IEEEFloat const&, llvm::detail::IEEEFloat) + 589 10 opt 0x00010b1d3a66 llvm::detail::IEEEFloat::fusedMultiplyAdd(llvm::detail::IEEEFloat const&, llvm::detail::IEEEFloat const&, llvm::APFloatBase::roundingMode) + 166 11 opt 0x00010b1dc714 llvm::detail::DoubleAPFloat::multiply(llvm::detail::DoubleAPFloat const&, llvm::APFloatBase::roundingMode) + 916 12 opt 0x00010aa899ef llvm::ConstantFoldBinaryInstruction(unsigned int, llvm::Constant*, llvm::Constant*) + 5567 13 opt 0x00010aaa9bd7 llvm::ConstantExpr::get(unsigned int, llvm::Constant*, llvm::Constant*, unsigned int, llvm::Type*) + 231 14 opt 0x00010a40d59e llvm::ConstantFoldBinaryOpOperands(unsigned int, llvm::Constant*, llvm::Constant*, llvm::DataLayout const&) + 1182 15 opt 0x00010a40b088 llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::DataLayout const&, llvm::TargetLibraryInfo const*) + 1224 16 opt 0x00010ad57323 combineInstructionsOverFunction(llvm::Function&, llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::ProfileSummaryInfo*, unsigned int, llvm::LoopInfo*) + 1699 17 opt 0x00010ad58831 llvm::InstructionCombiningPass::runOnFunction(llvm::Function&) + 913 18 opt 0x00010ab5a723 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1091 19 opt 0x00010ab5a9e8 llvm::FPPassManager::runOnModule(llvm::Module&) + 72 20 opt 0x00010ab5aec2 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 994 21 opt 0x0001093a7408 main + 10696 22 libdyld.dylib0x7fff6dedfcc9 start + 1 [1]53415 abort bin/opt -instcombine bugpoint-reduced-simplified.ll Found by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20034#c1 -- You are receiving this mail because: You are on the CC list for the bug.__
[llvm-bugs] [Bug 45431] New: PPC64 vector load and store, offsets, integer math versus pointer math
https://bugs.llvm.org/show_bug.cgi?id=45431 Bug ID: 45431 Summary: PPC64 vector load and store, offsets, integer math versus pointer math Product: clang Version: 7.0 Hardware: Other OS: Linux Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: noloa...@gmail.com CC: llvm-bugs@lists.llvm.org, neeil...@live.com, richard-l...@metafoo.co.uk Hi Everyone, This is an informational bug report. We support back to early PowerPC, including old PowerMacs. Loads and stores can be tricky to get right from early Altivec to modern Power8 and Power9. We recently cleaned up the code for our loads and stores and encountered a sharp edge. Previously we were casting the non-vector type used in vec_xl and vec_xst to a byte array, and then calling load. We switched to using the native non-vector type. I.e., if a 32-bit word array was used, then we called vec_xl and vec_xst using the word array. We found GCC and XLC uses integer math when calculating effective address using an offset. We found Clang uses pointer math when calculating effective address using an offset. An example: // PP64 ABI says src and dest arrays are non-const #define CONST_V8_CAST(x) ((unsigned char*)(x)) #define CONST_V32_CAST(x) ((unsigned int*)(x)) typedef __vector unsigned char uint8x16_p; typedef __vector unsigned int uint32x4_p; inline uint32x4_p VecLoad(int off, const word32 src[4]) { // Power7/ISA 2.06 provides vec_xl, but only for 32-bit and 64-bit // word pointers. The ISA lacks loads for short* and char*. // Power9/ISA 3.0 provides vec_xl for all datatypes. #if (defined(_ARCH_PWR7) && defined(__VSX__)) || defined(_ARCH_PWR8) const uintptr_t eff = reinterpret_cast(src)+off; ASSERT(eff % GetAlignmentOf() == 0); # if defined(__clang__) // GCC and XLC use integer math for the effective address. // LLVM uses pointer math for the effective address. return (uint32x4_p)vec_xl(0, CONST_V32_CAST(eff)); # else return (uint32x4_p)vec_xl(off, CONST_V32_CAST(src)); # endif #else return (uint32x4_p)VecLoad_ALTIVEC(off, CONST_V8_CAST(src)); #endif } VecLoad_ALTIVEC is that early vec_ld that uses vec_lvsl. It is the same code provided in NXP's Programming Environment Manual (PEM). This is definitely a sharp edge when using Clang. -- 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 45432] New: Assertion failed: (isImm() && "Wrong MachineOperand accessor"), function getImm, file llvm/include/llvm/CodeGen/MachineOperand.h, line 536.
https://bugs.llvm.org/show_bug.cgi?id=45432 Bug ID: 45432 Summary: Assertion failed: (isImm() && "Wrong MachineOperand accessor"), function getImm, file llvm/include/llvm/CodeGen/MachineOperand.h, line 536. Product: libraries Version: 10.0 Hardware: Other OS: FreeBSD Status: NEW Severity: normal Priority: P Component: Common Code Generator Code Assignee: unassignedb...@nondot.org Reporter: pku...@anongoth.pl CC: llvm-bugs@lists.llvm.org FreeBSD head on powerpc64, LLVM 10.0.0. The following problem happens when compiling astro/swe port. Reduced test case: struct a { int b }; struct c { double d; struct a e[] }; __thread struct c f; g; h() { struct a i = f.e[g]; if (i.b) j(); } Compiling flags: /usr/bin/cc -cc1 -triple powerpc64-unknown-freebsd13.0 -emit-obj -mrelocation-model static -O1 -x c sweph-e7e60d.c When -mrelocation-model static and -O1 or higher are passed, assertion failure happens. Without -mrelocation-model static, -O2 and -O3 may be set. With -mrelocation-model static, only -O0 works. -- 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 45433] New: Please merge c2dafe12dc24f7f1326f5c4c6a3b23f1485f1bd6 into release/10.x
https://bugs.llvm.org/show_bug.cgi?id=45433 Bug ID: 45433 Summary: Please merge c2dafe12dc24f7f1326f5c4c6a3b23f1485f1bd6 into release/10.x Product: new-bugs Version: 10.0 Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: natechancel...@gmail.com CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org Commit c2dafe12dc2 ("[SimplifyCFG] Skip merging return blocks if it would break a CallBr.") fixes an assertion seen when building the s390 Linux kernel. I have verified that it builds, passes ninja check-llvm, and fixes the issue. -- 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