[LLVMbugs] [Bug 23787] New: assert "frontend claimed part of a token?" while building a slightly tweaked libyuv
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 8 13:53:28 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23787
Bug ID: 23787
Summary: assert "frontend claimed part of a token?" while
building a slightly tweaked libyuv
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
fbarchard reported a compiler crash that reduces to:
thakis$ cat repro.ii
typedef unsigned char uint8;
__declspec(naked)
void I422ToRGBARow_SSSE3(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* dst_rgba,
int width) {
__asm {
push esi
push edi
mov eax, [esp + 8 + 4]
mov esi, [esp + 8 + 8]
mov edi, [esp + 8 + 12]
mov edx, [esp + 8 + 16]
mov ecx, [esp + 8 + 20]
sub edi, esi
convertloop:
__asm { __asm movd xmm0, [esi] __asm movd xmm1, [esi + edi] __asm lea esi,
[esi + 4] __asm punpcklbw xmm0, xmm1 __asm punpcklwd xmm0, xmm0 }
__asm { __asm movdqa xmm1, xmm0 __asm movdqa xmm2, xmm0 __asm movdqa xmm3,
xmm0 __asm movdqa xmm0, kYuvConstants.kUVBiasB __asm pmaddubsw xmm1,
kYuvConstants.kUVToB __asm psubw xmm0, xmm1 __asm movdqa xmm1,
kYuvConstants.kUVBiasG __asm pmaddubsw xmm2, kYuvConstants.kUVToG __asm psubw
xmm1, xmm2 __asm movdqa xmm2, kYuvConstants.kUVBiasR __asm pmaddubsw xmm3,
kYuvConstants.kUVToR __asm psubw xmm2, xmm3 __asm movq xmm3, qword ptr [eax]
__asm lea eax, [eax + 8] __asm punpcklbw xmm3, xmm3 __asm pmulhuw xmm3,
kYuvConstants.kYToRgb __asm paddsw xmm0, xmm3 __asm paddsw xmm1, xmm3 __asm
paddsw xmm2, xmm3 __asm psraw xmm0, 6 __asm psraw xmm1, 6 __asm psraw xmm2, 6
__asm packuswb xmm0, xmm0 __asm packuswb xmm1, xmm1 __asm packuswb xmm2, xmm2 }
__asm { __asm pcmpeqb xmm5, xmm5 __asm punpcklbw xmm1, xmm2 __asm punpcklbw
xmm5, xmm0 __asm movdqa xmm0, xmm5 __asm punpcklwd xmm5, xmm1 __asm punpckhwd
xmm0, xmm1 __asm movdqu 0[edx], xmm5 __asm movdqu 16[edx], xmm0 __asm lea edx,
[edx + 32] }
sub ecx, 8
jg convertloop
pop edi
pop esi
ret
}
}
thakis$ /Users/thakis/src/llvm-build/bin/clang "-cc1" "-fms-compatibility"
"-x" "c++" repro.ii
Assertion failed: (End.getPointer() <= EndPtr && "frontend claimed part of a
token?"), function ParseIntelIdentifier, file
/Users/thakis/src/llvm-svn/lib/Target/X86/AsmParser/X86AsmParser.cpp, line
1336.
0 clang 0x0000000103261799
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 57
1 clang 0x00000001032622db SignalHandler(int) + 779
2 libsystem_platform.dylib 0x00007fff8f3515aa _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1892346480
4 clang 0x0000000103261f16 abort + 22
5 clang 0x0000000103261ef1 __assert_rtn + 81
6 clang 0x00000001029f2581 (anonymous
namespace)::X86AsmParser::ParseIntelIdentifier(llvm::MCExpr const*&,
llvm::StringRef&, llvm::InlineAsmIdentifierInfo&, bool, llvm::SMLoc&) + 769
7 clang 0x00000001029f0e65 (anonymous
namespace)::X86AsmParser::ParseIntelMemOperand(long long, llvm::SMLoc, unsigned
int) + 245
8 clang 0x00000001029ec956 (anonymous
namespace)::X86AsmParser::ParseOperand() + 4054
9 clang 0x00000001029def9f (anonymous
namespace)::X86AsmParser::ParseInstruction(llvm::ParseInstructionInfo&,
llvm::StringRef, llvm::SMLoc,
llvm::SmallVectorImpl<std::__1::unique_ptr<llvm::MCParsedAsmOperand,
std::__1::default_delete<llvm::MCParsedAsmOperand> > >&) + 6687
10 clang 0x0000000103082a88 (anonymous
namespace)::AsmParser::parseStatement((anonymous
namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) + 3816
11 clang 0x000000010307dff5 (anonymous
namespace)::AsmParser::parseMSInlineAsm(void*, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned int&,
unsigned int&, llvm::SmallVectorImpl<std::__1::pair<void*, bool> >&,
llvm::SmallVectorImpl<std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > >&,
llvm::SmallVectorImpl<std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > >&, llvm::MCInstrInfo const*, llvm::MCInstPrinter
const*, llvm::MCAsmParserSemaCallback&) + 485
12 clang 0x0000000103cd509b
clang::Parser::ParseMicrosoftAsmStatement(clang::SourceLocation) + 5355
13 clang 0x0000000103cd6370
clang::Parser::ParseAsmStatement(bool&) + 1968
14 clang 0x0000000103cca456
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 854
15 clang 0x0000000103cca05b
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 155
16 clang 0x0000000103cd1e7f
clang::Parser::ParseCompoundStatementBody(bool) + 1855
17 clang 0x0000000103cd270c
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 188
18 clang 0x0000000103ce88ee
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
1966
19 clang 0x0000000103c619ed
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2861
20 clang 0x0000000103ce7ed4
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 692
21 clang 0x0000000103ce7897
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 375
22 clang 0x0000000103ce6747
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2935
23 clang 0x0000000103ce5a9c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 524
24 clang 0x0000000103c4e576 clang::ParseAST(clang::Sema&,
bool, bool) + 390
25 clang 0x0000000103495453 clang::FrontendAction::Execute()
+ 67
26 clang 0x0000000103463c3c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 972
27 clang 0x00000001034d64cb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4043
28 clang 0x0000000102188c6c cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1068
29 clang 0x0000000102187905 main + 11029
30 libdyld.dylib 0x00007fff837335fd start + 1
Stack dump:
0. Program arguments: /Users/thakis/src/llvm-build/bin/clang -cc1
-fms-compatibility -x c++ repro.ii
1. repro.ii:30:1: current parser token '}'
2. repro.ii:7:37: parsing function body 'I422ToRGBARow_SSSE3'
3. repro.ii:7:37: in compound statement ('{}')
--
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/20150608/00de30db/attachment.html>
More information about the llvm-bugs
mailing list