[LLVMbugs] [Bug 21838] New: [fuzz] SEGV in/below ParseGNUAttributes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 10 13:31:50 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21838
Bug ID: 21838
Summary: [fuzz] SEGV in/below ParseGNUAttributes
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: sami.liedes at iki.fi
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13479
--> http://llvm.org/bugs/attachment.cgi?id=13479&action=edit
test case
Fuzzing discovered that the attached test case, when given as input to
clang -fno-crash-diagnostics -std=c++11 -xc++ -c -emit-llvm
causes a segmentation fault:
segv.cpp:1:34: error: expected a qualified name after 'typename'
struct { __attribute__((typename >
^
0 clang-3.6 0x0000000001ececae llvm::sys::PrintStackTrace(_IO_FILE*) +
46
1 clang-3.6 0x0000000001ecfa4b
2 clang-3.6 0x0000000001ed1ce3
3 libpthread.so.0 0x00007f5e4e8848d0
4 clang-3.6 0x0000000001fe7bd0
5 clang-3.6 0x0000000001fe0f15
6 clang-3.6 0x00000000033b810f
clang::AttributeList::getKind(clang::IdentifierInfo const*,
clang::IdentifierInfo const*, clang::AttributeList::Syntax) + 31
7 clang-3.6 0x00000000031c2fe8
8 clang-3.6 0x00000000031c2e5d
9 clang-3.6 0x00000000031a1e26
10 clang-3.6 0x00000000031a157b
clang::Parser::ParseGNUAttributes(clang::ParsedAttributes&,
clang::SourceLocation*, clang::Parser::LateParsedAttrList*, clang::Declarator*)
+ 683
11 clang-3.6 0x00000000031aaf0e
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 6014
12 clang-3.6 0x00000000031cee32
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 2338
13 clang-3.6 0x00000000031ccb9a
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 4394
14 clang-3.6 0x00000000031cb4c8
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 10552
15 clang-3.6 0x00000000031ac037
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 10407
16 clang-3.6 0x0000000003195511
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 97
17 clang-3.6 0x0000000003195023
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 147
18 clang-3.6 0x000000000319465d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 3389
19 clang-3.6 0x00000000031936da
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 746
20 clang-3.6 0x000000000318eb83 clang::ParseAST(clang::Sema&, bool, bool)
+ 323
21 clang-3.6 0x0000000002106819 clang::ASTFrontendAction::ExecuteAction()
+ 345
22 clang-3.6 0x0000000002520221 clang::CodeGenAction::ExecuteAction() +
1521
23 clang-3.6 0x0000000002105fd0 clang::FrontendAction::Execute() + 112
24 clang-3.6 0x00000000020c4ef8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 824
25 clang-3.6 0x00000000022598a8
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1048
26 clang-3.6 0x0000000000a1eb27 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 727
27 clang-3.6 0x0000000000a13513
28 clang-3.6 0x0000000000a12557 main + 1031
29 libc.so.6 0x00007f5e4dab0b45 __libc_start_main + 245
30 clang-3.6 0x0000000000a11ff4
--
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/20141210/5228cbd5/attachment.html>
More information about the llvm-bugs
mailing list