<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 - SEGV in FormatASTNodeDiagnosticArgument()"
   href="https://bugs.llvm.org/show_bug.cgi?id=35555">35555</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SEGV in FormatASTNodeDiagnosticArgument()
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>emaste@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19524" name="attach_19524" title="reproducer">attachment 19524</a> <a href="attachment.cgi?id=19524&action=edit" title="reproducer">[details]</a></span>
reproducer

Raw reproducer attached, will try reducing

(lldb) bt
* thread #1, name = 'c++', stop reason = signal SIGSEGV
  * frame #0: 0x000000000155c84a c++`::FormatASTNodeDiagnosticArgument() at
ASTDiagnostic.cpp:396
    frame #1: 0x0000000002516403 c++`::FormatDiagnostic() [inlined]
ConvertArgToString at Diagnostic.h:701
    frame #2: 0x00000000025163a8 c++`::FormatDiagnostic() at Diagnostic.cpp:895
    frame #3: 0x00000000024e49c2 c++`::HandleDiagnostic() at
TextDiagnosticPrinter.cpp:118
    frame #4: 0x0000000001fac1bc c++`::ProcessDiag() [inlined] EmitDiag at
DiagnosticIDs.cpp:694
    frame #5: 0x0000000001fac19b c++`::ProcessDiag() at DiagnosticIDs.cpp:686
    frame #6: 0x0000000002515ed0 c++`::EmitCurrentDiagnostic() [inlined]
ProcessDiag at Diagnostic.h:879
    frame #7: 0x0000000002515ec5 c++`::EmitCurrentDiagnostic() at
Diagnostic.cpp:418
    frame #8: 0x0000000001633b70 c++`::EmitCurrentDiagnostic() at Sema.cpp:1142
    frame #9: 0x0000000001add31e c++`::BuildLambdaExpr() at SemaLambda.cpp:1530
    frame #10: 0x0000000001adcf87 c++`::ActOnLambdaExpr() at
SemaLambda.cpp:1424
    frame #11: 0x0000000001c536ba c++`::ParseLambdaExpressionAfterIntroducer()
at ParseExprCXX.cpp:1300
    frame #12: 0x0000000001c51f36 c++`::ParseLambdaExpression() at
ParseExprCXX.cpp:685
    frame #13: 0x0000000001c60eaa c++`::ParseCastExpression() at
ParseExpr.cpp:1411
    frame #14: 0x0000000001c59f35 c++`::ParseAssignmentExpression() [inlined]
ParseCastExpression at ParseExpr.cpp:521
    frame #15: 0x0000000001c59f23 c++`::ParseAssignmentExpression() at
ParseExpr.cpp:168
    frame #16: 0x0000000001c3b34a
c++`::ParseDeclarationAfterDeclaratorAndAttributes() [inlined] ParseInitializer
at Parser.h:1679
    frame #17: 0x0000000001c3b336
c++`::ParseDeclarationAfterDeclaratorAndAttributes() at ParseDecl.cpp:2216
    frame #18: 0x0000000001c397ca c++`::ParseDeclGroup() at ParseDecl.cpp:2006
    frame #19: 0x0000000001c35663 c++`::ParseSimpleDeclaration() at
ParseDecl.cpp:1738
    frame #20: 0x0000000001c35247 c++`::ParseDeclaration() at Parser.h:0
    frame #21: 0x0000000001c7e6ef
c++`::ParseStatementOrDeclarationAfterAttributes() at ParseStmt.cpp:214
    frame #22: 0x0000000001c7e34c c++`::ParseStatementOrDeclaration() at
ParseStmt.cpp:110
    frame #23: 0x0000000001c85239 c++`::ParseCompoundStatementBody() at
ParseStmt.cpp:1001
    frame #24: 0x0000000001c85aff c++`::ParseFunctionStatementBody() at
ParseStmt.cpp:1967
    frame #25: 0x0000000001be50a4 c++`::ParseFunctionDefinition() at
Parser.cpp:1212
    frame #26: 0x0000000001c396d4 c++`::ParseDeclGroup() at ParseDecl.cpp:1953
    frame #27: 0x0000000001be4521 c++`::ParseDeclOrFunctionDefInternal() at
Parser.cpp:979
    frame #28: 0x0000000001be3e7f c++`::ParseDeclarationOrFunctionDefinition()
at Parser.cpp:995
    frame #29: 0x0000000001be2eca c++`::ParseExternalDeclaration() at
Parser.cpp:845
    frame #30: 0x0000000001c196f7 c++`::ParseInnerNamespace() at
ParseDeclCXX.cpp:220
    frame #31: 0x0000000001c18fa5 c++`::ParseNamespace() at
ParseDeclCXX.cpp:195
    frame #32: 0x0000000001c35112 c++`::ParseDeclaration() at ParseDecl.cpp:0
    frame #33: 0x0000000001be248d c++`::ParseExternalDeclaration() [inlined]
SourceLocation at SourceLocation.h:98
    frame #34: 0x0000000001be2472 c++`::ParseExternalDeclaration() at
Parser.cpp:777
    frame #35: 0x0000000001be1c15 c++`::ParseTopLevelDecl() at Parser.cpp:613
    frame #36: 0x0000000001bdd9d5 c++`::ParseAST() at ParseAST.cpp:147
    frame #37: 0x000000000162258c c++`::Execute() at FrontendAction.cpp:902
    frame #38: 0x000000000236be01 c++`::ExecuteAction() at
CompilerInstance.cpp:980
    frame #39: 0x000000000123673e c++`::ExecuteCompilerInvocation() at
ExecuteCompilerInvocation.cpp:251
    frame #40: 0x000000000122b763 c++`::cc1_main() at cc1_main.cpp:221
    frame #41: 0x0000000001233d68 c++`main [inlined] ExecuteCC1Tool at
driver.cpp:306
    frame #42: 0x0000000001233d42 c++`main at driver.cpp:387
    frame #43: 0x000000000122b17f c++`_start(ap=<unavailable>,
cleanup=<unavailable>) at crt1.c:72
(lldb) frame sel 0
frame #0: 0x000000000155c84a c++`::FormatASTNodeDiagnosticArgument() at
ASTDiagnostic.cpp:396
   393          Qualified = false;
   394        }
   395        const NamedDecl *ND = reinterpret_cast<const NamedDecl*>(Val);
-> 396        ND->getNameForDiagnostic(OS, Context.getPrintingPolicy(),
Qualified);
   397        break;
   398      }
   399      case DiagnosticsEngine::ak_nestednamespec: {</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>