<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Crash on invalid"
href="https://bugs.llvm.org/show_bug.cgi?id=34981">34981</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash on invalid
</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>enhancement
</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>nicolasweber@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Download foo.ii from
<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=775590">https://bugs.chromium.org/p/chromium/issues/detail?id=775590</a> , then run:
/Users/thakis/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang
-cc1 -triple i386-pc-windows-msvc19.11.0 -emit-obj -mrelax-all
-mincremental-linker-compatible -disable-free -main-file-name base_jumbo_3.cc
-mrelocation-model static -mthread-model posix -mdisable-fp-elim
-relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu
pentium4 --dependent-lib=msvcrtd --dependent-lib=oldnames -fno-rtti-data
-stack-protector 2 -fms-volatile -fdiagnostics-format msvc -dwarf-column-info
-debugger-tuning=gdb -target-linker-version 274.1 -ffunction-sections
-coverage-notes-file /Users/thakis/src/chrome/src/out/gnwin/base_jumbo_3.gcno
-resource-dir
/Users/thakis/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/6.0.0
-O0 -fdeprecated-macro -fdebug-compilation-dir
/Users/thakis/src/chrome/src/out/gnwin -ferror-limit 19 -fmessage-length 0
-fno-use-cxa-atexit -fms-extensions -fms-compatibility
-fms-compatibility-version=19.11 -std=c++14 -fdelayed-template-parsing
-fno-inline -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o
obj/base/base/base_jumbo_3.obj -w -x c++ foo.ii
Emits a bunch of errors and then crashes like so:
0 clang 0x0000000102fc0c18
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 clang 0x0000000102fc1306
llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 886
2 libsystem_platform.dylib 0x00007fff9f311b3a _sigtramp + 26
3 libsystem_platform.dylib 0x00007f93e3065000 _sigtramp + 1138046176
4 clang 0x00000001040f3edf
clang::Sema::ActOnFunctionDeclarator(clang::Scope*, clang::Declarator&,
clang::DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&,
llvm::MutableArrayRef<clang::TemplateParameterList*>, bool&) + 23343
5 clang 0x00000001040ec44c
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&,
llvm::MutableArrayRef<clang::TemplateParameterList*>) + 3564
6 clang 0x0000000104113a28
clang::Sema::ActOnStartOfFunctionDef(clang::Scope*, clang::Declarator&,
llvm::MutableArrayRef<clang::TemplateParameterList*>,
clang::Sema::SkipBodyInfo*) + 200
7 clang 0x0000000103dfbd7b
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
1771
8 clang 0x0000000103d66e36
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2694
9 clang 0x0000000103dfb441
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 913
10 clang 0x0000000103dfae0c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 588
11 clang 0x0000000103df9885
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2965
12 clang 0x0000000103d7bfaa
clang::Parser::ParseInnerNamespace(std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&,
std::__1::vector<clang::IdentifierInfo*,
std::__1::allocator<clang::IdentifierInfo*> >&,
std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&, unsigned int,
clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&) + 298
13 clang 0x0000000103d7b846
clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&,
clang::SourceLocation) + 5142
14 clang 0x0000000103d61f2c
clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 460
15 clang 0x0000000103df8d99
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 169
16 clang 0x0000000103d7c60d
clang::Parser::ParseLinkage(clang::ParsingDeclSpec&, unsigned int) + 1357
17 clang 0x0000000103dfb424
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 884
18 clang 0x0000000103dfae0c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 588
19 clang 0x0000000103df9885
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2965
20 clang 0x0000000103df8395
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 757
21 clang 0x0000000103d52625 clang::ParseAST(clang::Sema&,
bool, bool) + 405
22 clang 0x00000001035ebbc9 clang::FrontendAction::Execute()
+ 137
23 clang 0x00000001035a2271
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 801
24 clang 0x000000010363a4ac
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4364
25 clang 0x00000001017eeeba cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1418
26 clang 0x00000001017ecbdf main + 11407
27 clang 0x00000001017e9ca4 start + 52
28 clang 0x000000000000003e start + 4269892558
Stack dump:
0. Program arguments:
/Users/thakis/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang
-cc1 -triple i386-pc-windows-msvc19.11.0 -emit-obj -mrelax-all
-mincremental-linker-compatible -disable-free -main-file-name base_jumbo_3.cc
-mrelocation-model static -mthread-model posix -mdisable-fp-elim
-relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu
pentium4 --dependent-lib=msvcrtd --dependent-lib=oldnames -fno-rtti-data
-stack-protector 2 -fms-volatile -fdiagnostics-format msvc -dwarf-column-info
-debugger-tuning=gdb -target-linker-version 274.1 -ffunction-sections
-coverage-notes-file /Users/thakis/src/chrome/src/out/gnwin/base_jumbo_3.gcno
-resource-dir
/Users/thakis/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/6.0.0
-O0 -fdeprecated-macro -fdebug-compilation-dir
/Users/thakis/src/chrome/src/out/gnwin -ferror-limit 19 -fmessage-length 0
-fno-use-cxa-atexit -fms-extensions -fms-compatibility
-fms-compatibility-version=19.11 -std=c++14 -fdelayed-template-parsing
-fno-inline -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o
obj/base/base/base_jumbo_3.obj -w -x c++ foo.ii
1. gen/base/../../../../base/win/i18n.cc:89:77: current parser token '{'
2. gen/base/../../../../base/win/i18n.cc:12:1: parsing namespace
'(anonymous)'</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>