Bug 237190 - cc drops core in sysutils/cdrtools configure test
Summary: cc drops core in sysutils/cdrtools configure test
Status: Closed DUPLICATE of bug 205934
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords: crash, needs-qa
Depends on:
Blocks:
 
Reported: 2019-04-11 05:11 UTC by Andrew "RhodiumToad" Gierth
Modified: 2019-04-11 18:30 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable12?
koobs: mfc-stable11?


Attachments
reproducer source (2.78 KB, text/plain)
2019-04-11 05:11 UTC, Andrew "RhodiumToad" Gierth
no flags Details
reproducer script (1.75 KB, text/plain)
2019-04-11 05:12 UTC, Andrew "RhodiumToad" Gierth
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew "RhodiumToad" Gierth 2019-04-11 05:11:48 UTC
Created attachment 203574 [details]
reproducer source

Running 12-stable at revision=346019

./configure test in sysutils/cdrtools makes cc drop a core (this is cc itself that crashes, NOT the generated conftest program).

Reproducer files attached.

Backtrace:

* thread #1, name = 'cc', stop reason = signal SIGSEGV
  * frame #0: 0x00000000015fdeb1 cc`::AddOverloadCandidate() [inlined] getNumParams at Type.h:3668
    frame #1: 0x00000000015fdeaa cc`::AddOverloadCandidate() at SemaOverload.cpp:6043
    frame #2: 0x000000000155b2df cc`::DiagnoseEmptyLookup() at SemaExpr.cpp:1899
    frame #3: 0x00000000016246d1 cc`::BuildRecoveryCallExpr() at SemaOverload.cpp:11889
    frame #4: 0x000000000161270a cc`::FinishOverloadedCallExpr() at SemaOverload.cpp:12007
    frame #5: 0x00000000016125c4 cc`::BuildOverloadedCallExpr() at SemaOverload.cpp:12122
    frame #6: 0x0000000001555501 cc`::ActOnCallExpr() at SemaExpr.cpp:5387
    frame #7: 0x0000000001b90a9a cc`::ParsePostfixExpressionSuffix() at ParseExpr.cpp:1681
    frame #8: 0x0000000001b92fbb cc`::ParseCastExpression() at ParseExpr.cpp:1448
    frame #9: 0x0000000001b8e785 cc`::ParseAssignmentExpression() [inlined] ParseCastExpression at ParseExpr.cpp:525
    frame #10: 0x0000000001b8e773 cc`::ParseAssignmentExpression() at ParseExpr.cpp:172
    frame #11: 0x0000000001b8e68e cc`clang::Parser::ParseExpression(clang::Parser::TypeCastState) at ParseExpr.cpp:124
    frame #12: 0x0000000001bb9567 cc`::ParseReturnStatement() at ParseStmt.cpp:1905
    frame #13: 0x0000000001bb45b0 cc`::ParseStatementOrDeclarationAfterAttributes() at ParseStmt.cpp:0
    frame #14: 0x0000000001bb3ddf cc`::ParseStatementOrDeclaration() at ParseStmt.cpp:110
    frame #15: 0x0000000001bbae99 cc`::ParseCompoundStatementBody() at ParseStmt.cpp:989
    frame #16: 0x0000000001bbb7c0 cc`::ParseFunctionStatementBody() at ParseStmt.cpp:1962
    frame #17: 0x0000000001b0b428 cc`::ParseFunctionDefinition() at Parser.cpp:1243
    frame #18: 0x0000000001b6f443 cc`::ParseDeclGroup() at ParseDecl.cpp:1968
    frame #19: 0x0000000001b0a6f9 cc`::ParseDeclOrFunctionDefInternal() at Parser.cpp:1012
    frame #20: 0x0000000001b0a177 cc`::ParseDeclarationOrFunctionDefinition() at Parser.cpp:1028
    frame #21: 0x0000000001b08dcf cc`::ParseExternalDeclaration() at Parser.cpp:853
    frame #22: 0x0000000001b07f0b cc`::ParseTopLevelDecl() at Parser.cpp:610
    frame #23: 0x0000000001b037a5 cc`::ParseAST() at ParseAST.cpp:158
    frame #24: 0x000000000151d755 cc`::Execute() at FrontendAction.cpp:910
    frame #25: 0x0000000002326d28 cc`::ExecuteAction() at CompilerInstance.cpp:961
    frame #26: 0x00000000010d51f4 cc`::ExecuteCompilerInvocation() at ExecuteCompilerInvocation.cpp:257
    frame #27: 0x00000000010c68af cc`::cc1_main() at cc1_main.cpp:218
    frame #28: 0x00000000010d2db1 cc`main [inlined] ExecuteCC1Tool at driver.cpp:310
    frame #29: 0x00000000010d2d84 cc`main at driver.cpp:382
    frame #30: 0x00000000010c610b cc`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1.c:76
Comment 1 Andrew "RhodiumToad" Gierth 2019-04-11 05:12:33 UTC
Created attachment 203575 [details]
reproducer script
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2019-04-11 16:33:26 UTC
This is the same problem as in bug 205934, which is an issue that I reported upstream more than a year ago: https://bugs.llvm.org/show_bug.cgi?id=36130

Unfortunately there hasn't been any movement upstream. Since the test fails because of the segfault (or assertion failure), I guess the configure script reckons that the requested feature is not supported. :)

*** This bug has been marked as a duplicate of bug 205934 ***
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2019-04-11 18:30:54 UTC
> Since the test fails because of the segfault (or assertion failure),
> I guess the configure script reckons that the requested feature is not supported. :)

Having talked with the author, I can confirm that this is more or less the intent of this configure test.  Better have the compiler crash there and avoid #pragma weak than have it crash later on during the build.