[llvm-bugs] [Bug 28388] New: Regression(270823:273743): Crash on invalid if

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 1 10:08:50 PDT 2016


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

            Bug ID: 28388
           Summary: Regression(270823:273743): Crash on invalid if
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

thakis at thakis:/tmp$ cat KeyboardEventManager-7781f5.cpp 
#define errno *__errno_location
int fn1() {
    if (errno;
thakis at thakis:/tmp$ ~/src/llvm-build/bin/clang -c
KeyboardEventManager-7781f5.cpp 
KeyboardEventManager-7781f5.cpp:3:9: error: use of undeclared identifier
'__errno_location'
    if (errno;
        ^
KeyboardEventManager-7781f5.cpp:1:16: note: expanded from macro 'errno'
#define errno *__errno_location
               ^
KeyboardEventManager-7781f5.cpp:3:14: error: expected ')'
    if (errno;
             ^
KeyboardEventManager-7781f5.cpp:3:8: note: to match this '('
    if (errno;
       ^
#0 0x0000000001b8a5d5 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x1b8a5d5)
#1 0x0000000001b88236 llvm::sys::RunSignalHandlers()
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x1b88236)
#2 0x0000000001b88461 SignalHandler(int)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x1b88461)
#3 0x00007f9def437330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x0000000002feab69 clang::Expr::getExprLoc() const
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x2feab69)
#5 0x0000000002b0ae62 clang::Sema::ActOnIfStmt(clang::SourceLocation, bool,
clang::Sema::ConditionResult, clang::Stmt*, clang::SourceLocation,
clang::Stmt*)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x2b0ae62)
#6 0x0000000002671a00 clang::Parser::ParseIfStatement(clang::SourceLocation*)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x2671a00)
#7 0x000000000266f1fb
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x266f1fb)
#8 0x000000000266f71d
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x266f71d)
#9 0x0000000002672be9 clang::Parser::ParseCompoundStatementBody(bool)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x2672be9)
#10 0x0000000002674d5f clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x2674d5f)
#11 0x0000000002602449
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x2602449)
#12 0x000000000261f370 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/local/google/home/thakis/src/llvm-build/bin/clang-3.8+0x261f370)

-- 
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/20160701/1d195e98/attachment.html>


More information about the llvm-bugs mailing list