<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang crashes in adjustRemoval with four byte input"
href="http://llvm.org/bugs/show_bug.cgi?id=21516">21516</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang crashes in adjustRemoval with four byte input
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.majnemer@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=13304" name="attach_13304" title="crashing input">attachment 13304</a> <a href="attachment.cgi?id=13304&action=edit" title="crashing input">[details]</a></span>
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>