[LLVMbugs] [Bug 22409] New: null deref in clang::NestedNameSpecifier::getKind on fuzzed input

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 30 09:04:33 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22409

            Bug ID: 22409
           Summary: null deref in clang::NestedNameSpecifier::getKind on
                    fuzzed input
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: kcc at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13777
  --> http://llvm.org/bugs/attachment.cgi?id=13777&action=edit
reproducer

clang -cc1 null-deref.cc

==34339==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc
0x00000b3aa330 bp 0x7fff3545e0d0 sp 0x7fff3545e0c0 T0)
    #0 0xb3aa32f in clang::NestedNameSpecifier::getKind() const
tools/clang/lib/AST/NestedNameSpecifier.cpp:132:8
    #1 0x85a652a in clang::Sema::ShouldEnterDeclaratorScope(clang::Scope*,
clang::CXXScopeSpec const&) tools/clang/lib/Sema/SemaCXXScopeSpec.cpp:998:11
    #2 0x7c96362 in clang::Parser::ParseUnqualifiedId(clang::CXXScopeSpec&,
bool, bool, bool, clang::OpaquePtr<clang::QualType>, clang::SourceLocation&,
clang::Unq»
    #3 0x7b816bd in clang::Parser::ParseDirectDeclarator(clang::Declarator&)
tools/clang/lib/Parse/ParseDecl.cpp:4977:11
    #4 0x7b7d152 in clang::Parser::ParseDeclaratorInternal(clang::Declarator&,
void (clang::Parser::*)(clang::Declarator&))
tools/clang/lib/Parse/ParseDecl.cpp:475»
    #5 0x7bee2e5 in
clang::Parser::ParseCXXMemberDeclaratorBeforeInitializer(clang::Declarator&,
clang::VirtSpecifiers&, clang::ActionResult<clang::Expr*, true>&, »
    #6 0x7bf3251 in
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&, clang::P»
    #7 0x7be13f6 in
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned in»
    #8 0x7bd2663 in clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, cl»
    #9 0x7b25500 in clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::De»
    #10 0x7b205c7 in clang::Parser::ParseSimpleDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::Fo»
    #11 0x7b1f42b in clang::Parser::ParseDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
tools/clang/lib/Parse/ParseDe»
    #12 0x7d9996d in
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::»
    #13 0x7d95a14 in
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) tools/clang/lib/Parse/ParseStm»
    #14 0x7dbc134 in clang::Parser::ParseCompoundStatementBody(bool)
tools/clang/lib/Parse/ParseStmt.cpp:950:11
    #15 0x7dc1c87 in clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) tools/clang/lib/Parse/ParseStmt.cpp:1865:21
    #16 0x7ac9016 in
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*»
    #17 0x7b380fa in clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
tools/clang/lib/Par»
    #18 0x7ac445e in
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) tool»
    #19 0x7ac2324 in
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier»
    #20 0x7ab7d5a in
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) tools/clang/lib/Parse/Parser.cpp:7»
    #21 0x7ab57a0 in
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
tools/clang/lib/Parse/Parser.cpp:569:12
    #22 0x7a9e5b4 in clang::ParseAST(clang::Sema&, bool, bool)
tools/clang/lib/Parse/ParseAST.cpp:134:7

-- 
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/20150130/cd38cbe6/attachment.html>


More information about the llvm-bugs mailing list