[llvm-bugs] [Bug 51970] New: Crash in clang::Expr::isDefaultArgument() with AppleClang 12.0.5

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Sep 25 09:54:02 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51970

            Bug ID: 51970
           Summary: Crash in clang::Expr::isDefaultArgument() with
                    AppleClang 12.0.5
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jeanmichael.celerier at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 25292
  --> https://bugs.llvm.org/attachment.cgi?id=25292&action=edit
Crash report as provided by clang

Here's a backtrace:

```
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   clang                               0x0000000105689c34
clang::CastExpr::getSubExprAsWritten() + 196
1   clang                               0x000000010568d411
clang::Expr::isDefaultArgument() const + 65
2   clang                               0x00000001055359d2
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExprs(clang::Expr* const*, unsigned
int, bool, llvm::SmallVectorImpl<clang::Expr*>&, bool*) + 98
3   clang                               0x000000010553a0cb
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) + 123
4   clang                               0x0000000105535bee
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExprs(clang::Expr* const*, unsigned
int, bool, llvm::SmallVectorImpl<clang::Expr*>&, bool*) + 638
5   clang                               0x000000010553a0cb
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) + 123
6   clang                               0x0000000105532e36
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*,
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::StmtDiscardKind) + 54
7   clang                               0x0000000105543b41
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*,
bool) + 209
8   clang                               0x0000000105546ec5
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformIfStmt(clang::IfStmt*) + 197
9   clang                               0x0000000105543b41
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*,
bool) + 209
10  clang                               0x0000000106a2a412
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCXXCatchStmt(clang::CXXCatchStmt*)
+ 50
11  clang                               0x0000000106a2a591
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCXXTryStmt(clang::CXXTryStmt*) +
193
12  clang                               0x0000000105543b41
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*,
bool) + 209
13  clang                               0x0000000105532ddb
clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList
const&) + 59
14  clang                               0x0000000105558e2d
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool) + 1309
15  clang                               0x000000010555ac82
clang::Sema::PerformPendingInstantiations(bool) + 402
16  clang                               0x0000000105558f3e
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool) + 1582
17  clang                               0x000000010555ac82
clang::Sema::PerformPendingInstantiations(bool) + 402
18  clang                               0x0000000105558f3e
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool) + 1582
19  clang                               0x000000010555ac82
clang::Sema::PerformPendingInstantiations(bool) + 402
20  clang                               0x0000000105558f3e
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool) + 1582
21  clang                               0x000000010555ac82
clang::Sema::PerformPendingInstantiations(bool) + 402
22  clang                               0x000000010514dca0
clang::Sema::ActOnEndOfTranslationUnitFragment(clang::Sema::TUFragmentKind) +
192
23  clang                               0x000000010514e939
clang::Sema::ActOnEndOfTranslationUnit() + 297
24  clang                               0x0000000105116462
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
+ 722
25  clang                               0x000000010509b4e6
clang::ParseAST(clang::Sema&, bool, bool) + 358
26  clang                               0x0000000104b17fb3
clang::FrontendAction::Execute() + 35
27  clang                               0x0000000104ad17f1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 897
28  clang                               0x0000000104b63095
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1829
29  clang                               0x0000000103bc14de
cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1678
30  clang                               0x0000000103bc0539
ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 761
31  clang                               0x0000000103bc01ac main + 4076
32  libdyld.dylib                       0x00007fff203f2f5d start + 1

```

My compiler:
```
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

```

-- 
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/20210925/af9bbd25/attachment-0001.html>


More information about the llvm-bugs mailing list