[llvm-bugs] [Bug 44740] New: Assertion `CondExpr->getType()->isInteg ralOrEnumerationType() && "invalid condition type"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 31 11:32:07 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44740

            Bug ID: 44740
           Summary: Assertion `CondExpr->getType()->isInteg
                    ralOrEnumerationType() && "invalid condition type"'
                    failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: changochen1 at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

POC:
---
#include < stdlib.h >
a() {          switch (ding
---

Run script:
---
clang -x c -o poc poc.c
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
56b7f595d2b402ff177ca42214325c8fdea10fb0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
---

Stack dump:
---
 #0 0x000000000681faf6 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:560:7
 #1 0x000000000681ac5e llvm::sys::RunSignalHandlers()
/home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:69:18
 #2 0x000000000681dd30 llvm::sys::CleanupOnSignal(unsigned long)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:3
 #3 0x000000000662a5aa (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
/home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:5
 #4 0x000000000662a9e6
/home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:361:51
 #5 0x00007f71603b9390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #6 0x00007f715ef23428 raise
/build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
 #7 0x00007f715ef2502a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0
 #8 0x00007f715ef1bbd7 __assert_fail_base
/build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0
 #9 0x00007f715ef1bc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#10 0x000000000cf19bbe
(/home/rxz226/llvm-project/bld_instru/bin/clang+0xcf19bbe)
#11 0x000000000bd93147 clang::ActionResult<clang::Stmt*, true>::isInvalid()
const /home/rxz226/llvm-project/clang/include/clang/Sema/Ownership.h:0:0
#12 0x000000000bd93147
clang::Parser::ParseSwitchStatement(clang::SourceLocation*)
/home/rxz226/llvm-project/clang/lib/Parse/ParseStmt.cpp:1492:0
#13 0x000000000bd8c43e
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) /home/r
xz226/llvm-project/clang/lib/Parse/ParseStmt.cpp:257:12
#14 0x000000000bd8aff1 clang::ParsedAttributesView::empty() const
/home/rxz226/llvm-project/clang/include/clang/Sema/ParsedAttr.h:0:0
#15 0x000000000bd8aff1
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
/home/rxz226/llvm-project/clang/lib/Parse/ParseStmt.cpp:109:0
#16 0x000000000bd9f27e clang::Parser::ParseCompoundStatementBody(bool)
/home/rxz226/llvm-project/clang/lib/Parse/ParseStmt.cpp:1079:11
#17 0x000000000bda2138 clang::ActionResult<clang::Stmt*, true>::isInvalid()
const /home/rxz226/llvm-project/clang/include/clang/Sema/Ownership.h:0:0
#18 0x000000000bda2138 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
/home/rxz226/llvm-project/clang/lib/Parse/ParseStmt.cpp:2207:0
#19 0x000000000bbc17c5
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
/home/rxz226/llvm-project/clang/lib/Parse/Parser.cpp:1349:10
...
---

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200131/0925bec8/attachment.html>


More information about the llvm-bugs mailing list