[LLVMbugs] [Bug 21516] New: clang crashes in adjustRemoval with four byte input

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 7 23:51:08 PST 2014


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

            Bug ID: 21516
           Summary: clang crashes in adjustRemoval with four byte input
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13304
  --> http://llvm.org/bugs/attachment.cgi?id=13304&action=edit
crashing input

run clang with attached file:
~/llvm/Debug+Asserts/bin/clang -cc1 -x c++ t.cpp

#8 0x11461a1 llvm::StringRef::operator[](unsigned long) const
~/llvm/src/include/llvm/ADT/StringRef.h:192:0 
#9 0x38bc79c adjustRemoval(clang::SourceManager const&, clang::LangOptions
const&, clang::SourceLocation, clang::edit::FileOffset, unsigned int&,
llvm::StringRef&) ~/llvm/src/tools/clang/lib/Edit/EditedSource.cpp:301:0
#10 0x38bc977 applyRewrite(clang::edit::EditsReceiver&, llvm::StringRef,
clang::edit::FileOffset, unsigned int, clang::SourceManager const&,
clang::LangOptions const&)
~/llvm/src/tools/clang/lib/Edit/EditedSource.cpp:322:0
#11 0x38bcd94
clang::edit::EditedSource::applyRewrites(clang::edit::EditsReceiver&)
~/llvm/src/tools/clang/lib/Edit/EditedSource.cpp:370:0  
#12 0x2519c4d mergeFixits(llvm::ArrayRef<clang::FixItHint>,
clang::SourceManager const&, clang::LangOptions const&,
llvm::SmallVectorImpl<clang::FixItHint>&)
~/llvm/src/tools/clang/lib/Frontend/DiagnosticRenderer.cpp:119:0
#13 0x2519e8f clang::DiagnosticRenderer::emitDiagnostic(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::StringRef,
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>,
clang::SourceManager const*, llvm::PointerUnion<clang::Diagnostic const*,
clang::StoredDiagnostic const*>)
~/llvm/src/tools/clang/lib/Frontend/DiagnosticRenderer.cpp:145:0
#14 0x244dc8c
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&)
~/llvm/src/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp:160:0 
#15 0x2318d37 clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const
~/llvm/src/tools/clang/lib/Basic/DiagnosticIDs.cpp:687:0
#16 0x2318cb9 clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&)
const ~/llvm/src/tools/clang/lib/Basic/DiagnosticIDs.cpp:679:0
#17 0x230bebb clang::DiagnosticsEngine::ProcessDiag()
~/llvm/src/tools/clang/include/clang/Basic/Diagnostic.h:795:0
#18 0x230e052 clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool)
~/llvm/src/tools/clang/lib/Basic/Diagnostic.cpp:371:0
#19 0x11470b8 clang::DiagnosticBuilder::Emit()
~/llvm/src/tools/clang/include/clang/Basic/Diagnostic.h:930:0
#20 0x11470e6 clang::DiagnosticBuilder::~DiagnosticBuilder()
~/llvm/src/tools/clang/include/clang/Basic/Diagnostic.h:957:0
#21 0x3ecf406 clang::Lexer::LexUnicode(clang::Token&, unsigned int, char
const*) ~/llvm/src/tools/clang/lib/Lex/Lexer.cpp:2847:0
#22 0x3ed1306 clang::Lexer::LexTokenInternal(clang::Token&, bool)
~/llvm/src/tools/clang/lib/Lex/Lexer.cpp:3597:0
#23 0x3ecf588 clang::Lexer::Lex(clang::Token&)
~/llvm/src/tools/clang/lib/Lex/Lexer.cpp:2891:0
#24 0x3f20d11 clang::Preprocessor::Lex(clang::Token&)
~/llvm/src/tools/clang/lib/Lex/Preprocessor.cpp:691:0
#25 0x3eeddc4 clang::Preprocessor::PeekAhead(unsigned int)
~/llvm/src/tools/clang/lib/Lex/PPCaching.cpp:89:0 
#26 0x311a3b2 clang::Preprocessor::LookAhead(unsigned int)
~/llvm/src/tools/clang/include/clang/Lex/Preprocessor.h:875:0
#27 0x311c601 clang::Parser::NextToken()
~/llvm/src/tools/clang/include/clang/Parse/Parser.h:530:0
#28 0x3164208
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::QualType>, bool, bool*, bool, clang::IdentifierInfo**)
~/llvm/src/tools/clang/lib/Parse/ParseExprCXX.cpp:418:0
#29 0x3123bd8 clang::Parser::TryAnnotateCXXScopeToken(bool)
~/llvm/src/tools/clang/lib/Parse/Parser.cpp:1690:0 
#30 0x3135f0c clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
~/llvm/src/tools/clang/lib/Parse/ParseDecl.cpp:2782:0
#31 0x31207db
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
~/llvm/src/tools/clang/lib/Parse/Parser.cpp:841:0 
#32 0x3120c81
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
~/llvm/src/tools/clang/lib/Parse/Parser.cpp:910:0
#33 0x3120468
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) ~/llvm/src/tools/clang/lib/Parse/Parser.cpp:768:0 
#34 0x311fabb
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
~/llvm/src/tools/clang/lib/Parse/Parser.cpp:569:0
#35 0x3119097 clang::ParseAST(clang::Sema&, bool, bool)
~/llvm/src/tools/clang/lib/Parse/ParseAST.cpp:135:0
#36 0x2414248 clang::ASTFrontendAction::ExecuteAction()
~/llvm/src/tools/clang/lib/Frontend/FrontendAction.cpp:528:0
#37 0x2413d23 clang::FrontendAction::Execute()
~/llvm/src/tools/clang/lib/Frontend/FrontendAction.cpp:432:0
#38 0x23dcaae clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
~/llvm/src/tools/clang/lib/Frontend/CompilerInstance.cpp:802:0
#39 0x2524023 clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
~/llvm/src/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:222:0
#40 0x1150990 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
~/llvm/src/tools/clang/tools/driver/cc1_main.cpp:110:0
#41 0x1148dd4 ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef)
~/llvm/src/tools/clang/tools/driver/driver.cpp:371:0
#42 0x11493b4 main ~/llvm/src/tools/clang/tools/driver/driver.cpp:417:0

-- 
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/20141108/356f9389/attachment.html>


More information about the llvm-bugs mailing list