<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 --- - segfault under clang::Sema::CorrectDelayedTyposInExpr"
   href="http://llvm.org/bugs/show_bug.cgi?id=22341">22341</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>segfault under clang::Sema::CorrectDelayedTyposInExpr
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mattm@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Trying to compile this (broken) code segfaults clang.

clang version 3.6.0 (trunk 223108)
Target: x86_64-unknown-linux-gnu
Thread model: posix


$ sh /tmp/trust_store_builtin-d79f20.sh                                         
In file included from ../../net/cert/trust_store_builtin.cc:29:
/tmp/certdata.cc:6:1: error: expected '}'
{"Distrust a pb.com certificate that does not comply with the baseline
requirements.", 84,
^
/tmp/certdata.cc:1:39: note: to match this '{'
static const TrustData trust_data[] = {
                                      ^
/tmp/certdata.cc:1407:37: error: expected ';' after top level declarator
static const int num_cert_data = 195
                                    ^
                                    ;
../../net/cert/trust_store_builtin.cc:39:23: error: use of undeclared
identifier 'num_trust_data'
  for (int i = 0; i < num_trust_data; ++i) {
                      ^
../../net/cert/trust_store_builtin.cc:52:23: error: use of undeclared
identifier 'num_cert_data'
  for (int i = 0; i < num_cert_data; ++i) {
                      ^
../../net/cert/trust_store_builtin.cc:55:21: error: use of undeclared
identifier 'cert_data'
        std::string(cert_data[i].title, cert_data[i].title_len);
                    ^
../../net/cert/trust_store_builtin.cc:55:41: error: use of undeclared
identifier 'cert_data'
        std::string(cert_data[i].title, cert_data[i].title_len);
                                        ^
../../net/cert/trust_store_builtin.cc:57:21: error: use of undeclared
identifier 'cert_data'
        std::string(cert_data[i].subject, cert_data[i].subject_len);
                    ^
../../net/cert/trust_store_builtin.cc:57:43: error: use of undeclared
identifier 'cert_data'
        std::string(cert_data[i].subject, cert_data[i].subject_len);
                                          ^
../../net/cert/trust_store_builtin.cc:59:21: error: use of undeclared
identifier 'cert_data'
        std::string(cert_data[i].certificate, cert_data[i].certificate_len);
                    ^
../../net/cert/trust_store_builtin.cc:59:47: error: use of undeclared
identifier 'cert_data'
        std::string(cert_data[i].certificate, cert_data[i].certificate_len);
                                              ^
0  clang     0x000000000141c848 llvm::sys::PrintStackTrace(_IO_FILE*) + 40
1  clang     0x000000000141de0b
2  libc.so.6 0x00007fd71fcecc30
3  clang     0x00000000021bb98c
clang::Sema::CorrectDelayedTyposInExpr(clang::Expr*,
llvm::function_ref<clang::ActionResult<clang::Expr*, true> (clang::Expr*)>) +
60
4  clang     0x0000000001e304ae clang::Parser::ParseBraceInitializer() + 718
5  clang     0x0000000001e106c6
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 1830
6  clang     0x0000000001e0ff96
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 230
7  clang     0x0000000001e0fe99
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
8  clang     0x0000000001e4efa9 clang::Parser::ParseExprStatement() + 41
9  clang     0x0000000001e4e96b
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 3531
10 clang     0x0000000001e4db0f
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 143
11 clang     0x0000000001e551ef clang::Parser::ParseCompoundStatementBody(bool)
+ 1839
12 clang     0x0000000001e4e880
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 3296
13 clang     0x0000000001e4db0f
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 143
14 clang     0x0000000001e5311d
clang::Parser::ParseForStatement(clang::SourceLocation*) + 4973
15 clang     0x0000000001e4e6f2
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 2898
16 clang     0x0000000001e4db0f
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 143
17 clang     0x0000000001e551ef clang::Parser::ParseCompoundStatementBody(bool)
+ 1839
18 clang     0x0000000001e55b03
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 195
19 clang     0x0000000001dd7b7b
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
1867
20 clang     0x0000000001de9973
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2515
21 clang     0x0000000001dd71ac
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 796
22 clang     0x0000000001dd6b8c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 412
23 clang     0x0000000001dd5e42
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2930
24 clang     0x0000000001dfd6d9
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 313
25 clang     0x0000000001dfcef0 clang::Parser::ParseNamespace(unsigned int,
clang::SourceLocation&, clang::SourceLocation) + 6080
26 clang     0x0000000001de4ea6 clang::Parser::ParseDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 422
27 clang     0x0000000001dd5983
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1715
28 clang     0x0000000001dd519f
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 463
29 clang     0x0000000001dd0f16 clang::ParseAST(clang::Sema&, bool, bool) + 422
30 clang     0x00000000015bb91e clang::FrontendAction::Execute() + 62
31 clang     0x000000000158d35c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 892
32 clang     0x000000000163e7ea
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3114
33 clang     0x00000000006d1b5c cc1_main(llvm::ArrayRef<char const*>, char
const*, void*) + 684
34 clang     0x00000000006d0589 main + 12089
35 libc.so.6 0x00007fd71fcd7ec5 __libc_start_main + 245
36 clang     0x00000000006cd52d
Stack dump:
0.      Program arguments:
/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
trust_store_builtin.cc -mrelocation-model pic -pic-level 2 -mthread-model posix
-mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-gdwarf-4 -dwarf-column-info -g -backend-option -split-dwarf=Enable -D
V8_DEPRECATION_WARNINGS -D _FILE_OFFSET_BITS=64 -D DISABLE_NACL -D
CHROMIUM_BUILD -D CR_CLANG_REVISION=223108 -D COMPONENT_BUILD -D
TOOLKIT_VIEWS=1 -D UI_COMPOSITOR_IMAGE_TRANSPORT -D USE_AURA=1 -D USE_ASH=1 -D
USE_PANGO=1 -D USE_CAIRO=1 -D USE_DEFAULT_RENDER_THEME=1 -D USE_LIBJPEG_TURBO=1
-D USE_X11=1 -D USE_CLIPBOARD_AURAX11=1 -D ENABLE_ONE_CLICK_SIGNIN -D
ENABLE_PRE_SYNC_BACKUP -D ENABLE_REMOTING=1 -D ENABLE_WEBRTC=1 -D
ENABLE_PEPPER_CDMS -D ENABLE_CONFIGURATION_POLICY -D ENABLE_NOTIFICATIONS -D
USE_UDEV -D DONT_EMBED_BUILD_METADATA -D ENABLE_TASK_MANAGER=1 -D
ENABLE_EXTENSIONS=1 -D ENABLE_PLUGINS=1 -D ENABLE_SESSION_SERVICE=1 -D
ENABLE_THEMES=1 -D ENABLE_AUTOFILL_DIALOG=1 -D ENABLE_BACKGROUND=1 -D
ENABLE_GOOGLE_NOW=1 -D CLD_VERSION=2 -D ENABLE_PRINTING=1 -D
ENABLE_BASIC_PRINTING=1 -D ENABLE_PRINT_PREVIEW=1 -D ENABLE_SPELLCHECK=1 -D
ENABLE_CAPTIVE_PORTAL_DETECTION=1 -D ENABLE_APP_LIST=1 -D ENABLE_SETTINGS_APP=1
-D ENABLE_SUPERVISED_USERS=1 -D ENABLE_MDNS=1 -D ENABLE_SERVICE_DISCOVERY=1 -D
V8_USE_EXTERNAL_STARTUP_DATA -D NET_IMPLEMENTATION -D USE_KERBEROS -D
DLOPEN_KERBEROS -D ENABLE_BUILT_IN_DNS -D U_USING_ICU_NAMESPACE=0 -D
U_ENABLE_DYLOAD=0 -D BORINGSSL_SHARED_LIBRARY -D USE_GCONF -D USE_GIO -D
GLIB_DISABLE_DEPRECATION_WARNINGS -D USE_LIBPCI=1 -D USE_OPENSSL=1 -D
USE_OPENSSL_CERTS=1 -D USE_GLIB=1 -D __STDC_CONSTANT_MACROS -D
__STDC_FORMAT_MACROS -D DYNAMIC_ANNOTATIONS_ENABLED=1 -D
WTF_USE_DYNAMIC_ANNOTATIONS=1 -D _DEBUG -D _GLIBCXX_DEBUG=1 -O0 -Werror -Wall
-Wno-unused-parameter -Wno-missing-field-initializers
-Wno-reserved-user-defined-literal -Wheader-hygiene -Wno-char-subscripts
-Wno-unneeded-internal-declaration -Wno-covered-switch-default
-Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register
-Wno-inconsistent-missing-override -Wexit-time-destructors
-Wno-undefined-bool-conversion -Wno-tautological-undefined-compare
-Wsign-compare -std=gnu++11 -fdeprecated-macro -ferror-limit 19
-fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -pthread
-stack-protector 1 -stack-protector-buffer-size 4 -mstackrealign -fno-rtti
-fno-threadsafe-statics -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -load
/y/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so
-add-plugin find-bad-constructs -plugin-arg-find-bad-constructs
check-weak-ptr-factory-order -plugin-arg-find-bad-constructs
strict-virtual-specifiers -x c++ trust_store_builtin-d79f20.cpp
-split-dwarf-file obj/net/cert/net.trust_store_builtin.dwo 
1.      ../../net/cert/trust_store_builtin.cc:60:36: current parser token ','
2.      ../../net/cert/trust_store_builtin.cc:7:1: parsing namespace 'net'
3.      ../../net/cert/trust_store_builtin.cc:38:40: parsing function body
'TrustStoreBuiltin'
4.      ../../net/cert/trust_store_builtin.cc:38:40: in compound statement
('{}')
5.      ../../net/cert/trust_store_builtin.cc:52:43: in compound statement
('{}')
/tmp/trust_store_builtin-d79f20.sh: line 1: 16691 Segmentation fault      (core
dumped) "/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang"
"-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all"
"-disable-free" "-main-file-name" "trust_store_builtin.cc" "-mrelocation-model"
"pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim"
"-relaxed-aliasing" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64" "-gdwarf-4"
"-dwarf-column-info" "-g" "-backend-option" "-split-dwarf=Enable" "-D"
"V8_DEPRECATION_WARNINGS" "-D" "_FILE_OFFSET_BITS=64" "-D" "DISABLE_NACL" "-D"
"CHROMIUM_BUILD" "-D" "CR_CLANG_REVISION=223108" "-D" "COMPONENT_BUILD" "-D"
"TOOLKIT_VIEWS=1" "-D" "UI_COMPOSITOR_IMAGE_TRANSPORT" "-D" "USE_AURA=1" "-D"
"USE_ASH=1" "-D" "USE_PANGO=1" "-D" "USE_CAIRO=1" "-D"
"USE_DEFAULT_RENDER_THEME=1" "-D" "USE_LIBJPEG_TURBO=1" "-D" "USE_X11=1" "-D"
"USE_CLIPBOARD_AURAX11=1" "-D" "ENABLE_ONE_CLICK_SIGNIN" "-D"
"ENABLE_PRE_SYNC_BACKUP" "-D" "ENABLE_REMOTING=1" "-D" "ENABLE_WEBRTC=1" "-D"
"ENABLE_PEPPER_CDMS" "-D" "ENABLE_CONFIGURATION_POLICY" "-D"
"ENABLE_NOTIFICATIONS" "-D" "USE_UDEV" "-D" "DONT_EMBED_BUILD_METADATA" "-D"
"ENABLE_TASK_MANAGER=1" "-D" "ENABLE_EXTENSIONS=1" "-D" "ENABLE_PLUGINS=1" "-D"
"ENABLE_SESSION_SERVICE=1" "-D" "ENABLE_THEMES=1" "-D"
"ENABLE_AUTOFILL_DIALOG=1" "-D" "ENABLE_BACKGROUND=1" "-D"
"ENABLE_GOOGLE_NOW=1" "-D" "CLD_VERSION=2" "-D" "ENABLE_PRINTING=1" "-D"
"ENABLE_BASIC_PRINTING=1" "-D" "ENABLE_PRINT_PREVIEW=1" "-D"
"ENABLE_SPELLCHECK=1" "-D" "ENABLE_CAPTIVE_PORTAL_DETECTION=1" "-D"
"ENABLE_APP_LIST=1" "-D" "ENABLE_SETTINGS_APP=1" "-D"
"ENABLE_SUPERVISED_USERS=1" "-D" "ENABLE_MDNS=1" "-D"
"ENABLE_SERVICE_DISCOVERY=1" "-D" "V8_USE_EXTERNAL_STARTUP_DATA" "-D"
"NET_IMPLEMENTATION" "-D" "USE_KERBEROS" "-D" "DLOPEN_KERBEROS" "-D"
"ENABLE_BUILT_IN_DNS" "-D" "U_USING_ICU_NAMESPACE=0" "-D" "U_ENABLE_DYLOAD=0"
"-D" "BORINGSSL_SHARED_LIBRARY" "-D" "USE_GCONF" "-D" "USE_GIO" "-D"
"GLIB_DISABLE_DEPRECATION_WARNINGS" "-D" "USE_LIBPCI=1" "-D" "USE_OPENSSL=1"
"-D" "USE_OPENSSL_CERTS=1" "-D" "USE_GLIB=1" "-D" "__STDC_CONSTANT_MACROS" "-D"
"__STDC_FORMAT_MACROS" "-D" "DYNAMIC_ANNOTATIONS_ENABLED=1" "-D"
"WTF_USE_DYNAMIC_ANNOTATIONS=1" "-D" "_DEBUG" "-D" "_GLIBCXX_DEBUG=1" "-O0"
"-Werror" "-Wall" "-Wno-unused-parameter" "-Wno-missing-field-initializers"
"-Wno-reserved-user-defined-literal" "-Wheader-hygiene" "-Wno-char-subscripts"
"-Wno-unneeded-internal-declaration" "-Wno-covered-switch-default"
"-Wstring-conversion" "-Wno-c++11-narrowing" "-Wno-deprecated-register"
"-Wno-inconsistent-missing-override" "-Wexit-time-destructors"
"-Wno-undefined-bool-conversion" "-Wno-tautological-undefined-compare"
"-Wsign-compare" "-std=gnu++11" "-fdeprecated-macro" "-ferror-limit" "19"
"-fmessage-length" "0" "-fvisibility" "hidden" "-fvisibility-inlines-hidden"
"-pthread" "-stack-protector" "1" "-stack-protector-buffer-size" "4"
"-mstackrealign" "-fno-rtti" "-fno-threadsafe-statics" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-load"
"/y/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so"
"-add-plugin" "find-bad-constructs" "-plugin-arg-find-bad-constructs"
"check-weak-ptr-factory-order" "-plugin-arg-find-bad-constructs"
"strict-virtual-specifiers" "-x" "c++" "trust_store_builtin-d79f20.cpp"
"-split-dwarf-file" "obj/net/cert/net.trust_store_builtin.dwo"</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>