llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.24k stars 12.07k forks source link

Crash when parsing `#pragma omp task` and `[[omp::directive(task)]]` #116258

Open Gian-Laager opened 1 week ago

Gian-Laager commented 1 week ago

Crash when it encounters this #pragma

#pragma omp task
        {
            leftNode =
                build_up_quad_tree_split(maxDepth - (splitDir == SplitDir::Y),
                                         leftBodies,
                                         switch_split_dir(splitDir),
                                         numBodiesThreshold);
        }

if I remove the pragma it compiles just fine, but the same/similar crash also happens with the [[omp::directive(task)]] syntax.

Here's the full stdout:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/bin/clang++ -I/home/gianl/code/C++/sandbox/mp-grav-sim/include -I/home/gianl/code/C++/num-utils/include -isystem /usr/include/eigen3 -Wall -fopenmp 
-g -O0 -g -std=gnu++23 -Winvalid-pch -Xclang -include-pch -Xclang /home/gianl/code/C++/sandbox/mp-grav-sim/cmake-build-debug/CMakeFiles/libmp-grav-sim.dir/cmake_pch.hxx.pch -Xclang
 -include -Xclang /home/gianl/code/C++/sandbox/mp-grav-sim/cmake-build-debug/CMakeFiles/libmp-grav-sim.dir/cmake_pch.hxx -MD -MT CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o -
MF CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o.d -o CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o -c /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp
1.      /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:95:52: current parser token ','
2.      /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:4:1: parsing namespace 'sim'
3.      /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:51:5: parsing function body 'sim::build_up_quad_tree_split'
4.      /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:51:5: in compound statement ('{}')
5.      /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:92:9: in compound statement ('{}')
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libLLVM.so.18.1      0x000070c9ecfc4d90 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 64
1  libLLVM.so.18.1      0x000070c9ecfc226d llvm::sys::CleanupOnSignal(unsigned long) + 141
2  libLLVM.so.18.1      0x000070c9ecea88e9
3  libc.so.6            0x000070c9ec24c1d0
4  libclang-cpp.so.18.1 0x000070c9f4da55de
5  libclang-cpp.so.18.1 0x000070c9f5c8b942
6  libclang-cpp.so.18.1 0x000070c9f5c8e53f clang::Sema::isOpenMPPrivateDecl(clang::ValueDecl*, unsigned int, unsigned int) const + 943
7  libclang-cpp.so.18.1 0x000070c9f5ae650d clang::Sema::tryCaptureVariable(clang::ValueDecl*, clang::SourceLocation, clang::Sema::TryCaptureKind, clang::SourceLocation, bool, clang
::QualType&, clang::QualType&, unsigned int const*) + 6765
8  libclang-cpp.so.18.1 0x000070c9f5ab8de9 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::NestedN
ameSpecifierLoc, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) + 169
9  libclang-cpp.so.18.1 0x000070c9f5ab9376 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::CXXScop
eSpec const*, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) + 86
10 libclang-cpp.so.18.1 0x000070c9f5abb832 clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::DeclarationNameInfo const&, clang::NamedDecl*, clang::NamedDecl*
, clang::TemplateArgumentListInfo const*, bool) + 786
11 libclang-cpp.so.18.1 0x000070c9f5abc0ce clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::LookupResult&, bool, bool) + 638
12 libclang-cpp.so.18.1 0x000070c9f5abca0f clang::Sema::ActOnIdExpression(clang::Scope*, clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&, bool, bool, clang::Corr
ectionCandidateCallback*, bool, clang::Token*) + 2287
13 libclang-cpp.so.18.1 0x000070c9f4fc02ba clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) + 2010
14 libclang-cpp.so.18.1 0x000070c9f71ce8da
15 libclang-cpp.so.18.1 0x000070c9f71ce9ab
16 libclang-cpp.so.18.1 0x000070c9f500761f clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&, llvm::function_ref<void ()>, bool, bool) + 143
17 libclang-cpp.so.18.1 0x000070c9f4faa46e clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) + 2990
18 libclang-cpp.so.18.1 0x000070c9f4fbfed7 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) + 1015
19 libclang-cpp.so.18.1 0x000070c9f71ce8da
20 libclang-cpp.so.18.1 0x000070c9f71ce9ab
21 libclang-cpp.so.18.1 0x000070c9f4fa7e1a clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*, true>, clang::prec::Level) + 2378
22 libclang-cpp.so.18.1 0x000070c9f71ceb15
23 libclang-cpp.so.18.1 0x000070c9f505fe52 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) + 82
24 libclang-cpp.so.18.1 0x000070c9f505e037 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang:
:SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 3495
25 libclang-cpp.so.18.1 0x000070c9f505e258 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation
*) + 344
26 libclang-cpp.so.18.1 0x000070c9f5063b0a clang::Parser::ParseCompoundStatementBody(bool) + 1322
27 libclang-cpp.so.18.1 0x000070c9f5064184 clang::Parser::ParseCompoundStatement(bool, unsigned int) + 36
28 libclang-cpp.so.18.1 0x000070c9f505df7f clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang:
:SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 3311
29 libclang-cpp.so.18.1 0x000070c9f505e258 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation
*) + 344
30 libclang-cpp.so.18.1 0x000070c9f505e770 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) + 96
31 libclang-cpp.so.18.1 0x000070c9f5028431 clang::Parser::ParseOpenMPDeclarativeOrExecutableDirective(clang::Parser::ParsedStmtContext, bool) + 5905
32 libclang-cpp.so.18.1 0x000070c9f505d7e6 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang:
:SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 1366
33 libclang-cpp.so.18.1 0x000070c9f505e258 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation
*) + 344
34 libclang-cpp.so.18.1 0x000070c9f5063b0a clang::Parser::ParseCompoundStatementBody(bool) + 1322
35 libclang-cpp.so.18.1 0x000070c9f5065ad4 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 228
36 libclang-cpp.so.18.1 0x000070c9f5066c3f clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttr
List*) + 1903
37 libclang-cpp.so.18.1 0x000070c9f4fc4ae0 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang:
:Parser::ForRangeInit*) + 3760
38 libclang-cpp.so.18.1 0x000070c9f5050773 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::A
ccessSpecifier) + 1107
39 libclang-cpp.so.18.1 0x000070c9f50694d2 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 642
40 libclang-cpp.so.18.1 0x000070c9f4fbb47f clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&,
 clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 527
41 libclang-cpp.so.18.1 0x000070c9f4fbc5f9 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) + 4185
42 libclang-cpp.so.18.1 0x000070c9f4fdd18c clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, cla
ng::SourceLocation*) + 1100
43 libclang-cpp.so.18.1 0x000070c9f506954b clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 763
44 libclang-cpp.so.18.1 0x000070c9f506a0eb clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 427
45 libclang-cpp.so.18.1 0x000070c9f4f8d038 clang::ParseAST(clang::Sema&, bool, bool) + 632
46 libclang-cpp.so.18.1 0x000070c9f6a58451 clang::FrontendAction::Execute() + 433
47 libclang-cpp.so.18.1 0x000070c9f69f9097 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 439
48 libclang-cpp.so.18.1 0x000070c9f6ab07fd clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 445
49 clang++              0x0000653d798ef3a4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 8900
50 clang++              0x0000653d798f370a
51 libclang-cpp.so.18.1 0x000070c9f672e485
52 libLLVM.so.18.1      0x000070c9ecea8d3a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 42
53 libclang-cpp.so.18.1 0x000070c9f6730e16
54 libclang-cpp.so.18.1 0x000070c9f66ec039 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 169
55 libclang-cpp.so.18.1 0x000070c9f66ec43c clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*
>>&, bool) const + 252
56 libclang-cpp.so.18.1 0x000070c9f670a864 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*
>>&) + 388
57 clang++              0x0000653d798f6045 clang_main(int, char**, llvm::ToolContext const&) + 9669
58 clang++              0x0000653d798e6fd5 main + 133
59 libc.so.6            0x000070c9ec234e08
60 libc.so.6            0x000070c9ec234ecc __libc_start_main + 140
61 clang++              0x0000653d798e7035 _start + 37
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 18.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/quad-tree-f6b042.cpp
clang++: note: diagnostic msg: /tmp/quad-tree-f6b042.sh
clang++: note: diagnostic msg: 

********************
make[3]: *** [CMakeFiles/libmp-grav-sim.dir/build.make:109: CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:190: CMakeFiles/libmp-grav-sim.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:412: test/CMakeFiles/mp-grav-sim-test.dir/rule] Error 2
make: *** [Makefile:273: mp-grav-sim-test] Error 2

and the sources and run scripts: report.zip

In case it's helpful I could also push the code base to GitHub since it's just a side project.

llvmbot commented 1 week ago

@llvm/issue-subscribers-clang-frontend

Author: None (Gian-Laager)

Crash when it encounters this `#pragma` ``` #pragma omp task { leftNode = build_up_quad_tree_split(maxDepth - (splitDir == SplitDir::Y), leftBodies, switch_split_dir(splitDir), numBodiesThreshold); } ``` if I remove the pragma it compiles just fine, but the same/similar crash also happens with the `[[omp::directive(task)]]` syntax. Here's the full stdout: ``` PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /usr/bin/clang++ -I/home/gianl/code/C++/sandbox/mp-grav-sim/include -I/home/gianl/code/C++/num-utils/include -isystem /usr/include/eigen3 -Wall -fopenmp -g -O0 -g -std=gnu++23 -Winvalid-pch -Xclang -include-pch -Xclang /home/gianl/code/C++/sandbox/mp-grav-sim/cmake-build-debug/CMakeFiles/libmp-grav-sim.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/gianl/code/C++/sandbox/mp-grav-sim/cmake-build-debug/CMakeFiles/libmp-grav-sim.dir/cmake_pch.hxx -MD -MT CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o - MF CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o.d -o CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o -c /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp 1. /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:95:52: current parser token ',' 2. /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:4:1: parsing namespace 'sim' 3. /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:51:5: parsing function body 'sim::build_up_quad_tree_split' 4. /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:51:5: in compound statement ('{}') 5. /home/gianl/code/C++/sandbox/mp-grav-sim/src/quad-tree.cpp:92:9: in compound statement ('{}') Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 libLLVM.so.18.1 0x000070c9ecfc4d90 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 64 1 libLLVM.so.18.1 0x000070c9ecfc226d llvm::sys::CleanupOnSignal(unsigned long) + 141 2 libLLVM.so.18.1 0x000070c9ecea88e9 3 libc.so.6 0x000070c9ec24c1d0 4 libclang-cpp.so.18.1 0x000070c9f4da55de 5 libclang-cpp.so.18.1 0x000070c9f5c8b942 6 libclang-cpp.so.18.1 0x000070c9f5c8e53f clang::Sema::isOpenMPPrivateDecl(clang::ValueDecl*, unsigned int, unsigned int) const + 943 7 libclang-cpp.so.18.1 0x000070c9f5ae650d clang::Sema::tryCaptureVariable(clang::ValueDecl*, clang::SourceLocation, clang::Sema::TryCaptureKind, clang::SourceLocation, bool, clang ::QualType&, clang::QualType&, unsigned int const*) + 6765 8 libclang-cpp.so.18.1 0x000070c9f5ab8de9 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::NestedN ameSpecifierLoc, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) + 169 9 libclang-cpp.so.18.1 0x000070c9f5ab9376 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::CXXScop eSpec const*, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) + 86 10 libclang-cpp.so.18.1 0x000070c9f5abb832 clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::DeclarationNameInfo const&, clang::NamedDecl*, clang::NamedDecl* , clang::TemplateArgumentListInfo const*, bool) + 786 11 libclang-cpp.so.18.1 0x000070c9f5abc0ce clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::LookupResult&, bool, bool) + 638 12 libclang-cpp.so.18.1 0x000070c9f5abca0f clang::Sema::ActOnIdExpression(clang::Scope*, clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&, bool, bool, clang::Corr ectionCandidateCallback*, bool, clang::Token*) + 2287 13 libclang-cpp.so.18.1 0x000070c9f4fc02ba clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) + 2010 14 libclang-cpp.so.18.1 0x000070c9f71ce8da 15 libclang-cpp.so.18.1 0x000070c9f71ce9ab 16 libclang-cpp.so.18.1 0x000070c9f500761f clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&, llvm::function_ref<void ()>, bool, bool) + 143 17 libclang-cpp.so.18.1 0x000070c9f4faa46e clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) + 2990 18 libclang-cpp.so.18.1 0x000070c9f4fbfed7 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) + 1015 19 libclang-cpp.so.18.1 0x000070c9f71ce8da 20 libclang-cpp.so.18.1 0x000070c9f71ce9ab 21 libclang-cpp.so.18.1 0x000070c9f4fa7e1a clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*, true>, clang::prec::Level) + 2378 22 libclang-cpp.so.18.1 0x000070c9f71ceb15 23 libclang-cpp.so.18.1 0x000070c9f505fe52 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) + 82 24 libclang-cpp.so.18.1 0x000070c9f505e037 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang: :SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 3495 25 libclang-cpp.so.18.1 0x000070c9f505e258 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation *) + 344 26 libclang-cpp.so.18.1 0x000070c9f5063b0a clang::Parser::ParseCompoundStatementBody(bool) + 1322 27 libclang-cpp.so.18.1 0x000070c9f5064184 clang::Parser::ParseCompoundStatement(bool, unsigned int) + 36 28 libclang-cpp.so.18.1 0x000070c9f505df7f clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang: :SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 3311 29 libclang-cpp.so.18.1 0x000070c9f505e258 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation *) + 344 30 libclang-cpp.so.18.1 0x000070c9f505e770 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) + 96 31 libclang-cpp.so.18.1 0x000070c9f5028431 clang::Parser::ParseOpenMPDeclarativeOrExecutableDirective(clang::Parser::ParsedStmtContext, bool) + 5905 32 libclang-cpp.so.18.1 0x000070c9f505d7e6 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang: :SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 1366 33 libclang-cpp.so.18.1 0x000070c9f505e258 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation *) + 344 34 libclang-cpp.so.18.1 0x000070c9f5063b0a clang::Parser::ParseCompoundStatementBody(bool) + 1322 35 libclang-cpp.so.18.1 0x000070c9f5065ad4 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 228 36 libclang-cpp.so.18.1 0x000070c9f5066c3f clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttr List*) + 1903 37 libclang-cpp.so.18.1 0x000070c9f4fc4ae0 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang: :Parser::ForRangeInit*) + 3760 38 libclang-cpp.so.18.1 0x000070c9f5050773 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::A ccessSpecifier) + 1107 39 libclang-cpp.so.18.1 0x000070c9f50694d2 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 642 40 libclang-cpp.so.18.1 0x000070c9f4fbb47f clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 527 41 libclang-cpp.so.18.1 0x000070c9f4fbc5f9 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) + 4185 42 libclang-cpp.so.18.1 0x000070c9f4fdd18c clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, cla ng::SourceLocation*) + 1100 43 libclang-cpp.so.18.1 0x000070c9f506954b clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 763 44 libclang-cpp.so.18.1 0x000070c9f506a0eb clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 427 45 libclang-cpp.so.18.1 0x000070c9f4f8d038 clang::ParseAST(clang::Sema&, bool, bool) + 632 46 libclang-cpp.so.18.1 0x000070c9f6a58451 clang::FrontendAction::Execute() + 433 47 libclang-cpp.so.18.1 0x000070c9f69f9097 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 439 48 libclang-cpp.so.18.1 0x000070c9f6ab07fd clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 445 49 clang++ 0x0000653d798ef3a4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 8900 50 clang++ 0x0000653d798f370a 51 libclang-cpp.so.18.1 0x000070c9f672e485 52 libLLVM.so.18.1 0x000070c9ecea8d3a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 42 53 libclang-cpp.so.18.1 0x000070c9f6730e16 54 libclang-cpp.so.18.1 0x000070c9f66ec039 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 169 55 libclang-cpp.so.18.1 0x000070c9f66ec43c clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const* >>&, bool) const + 252 56 libclang-cpp.so.18.1 0x000070c9f670a864 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const* >>&) + 388 57 clang++ 0x0000653d798f6045 clang_main(int, char**, llvm::ToolContext const&) + 9669 58 clang++ 0x0000653d798e6fd5 main + 133 59 libc.so.6 0x000070c9ec234e08 60 libc.so.6 0x000070c9ec234ecc __libc_start_main + 140 61 clang++ 0x0000653d798e7035 _start + 37 clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation) clang version 18.1.8 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin clang++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang++: note: diagnostic msg: /tmp/quad-tree-f6b042.cpp clang++: note: diagnostic msg: /tmp/quad-tree-f6b042.sh clang++: note: diagnostic msg: ******************** make[3]: *** [CMakeFiles/libmp-grav-sim.dir/build.make:109: CMakeFiles/libmp-grav-sim.dir/src/quad-tree.cpp.o] Error 1 make[2]: *** [CMakeFiles/Makefile2:190: CMakeFiles/libmp-grav-sim.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:412: test/CMakeFiles/mp-grav-sim-test.dir/rule] Error 2 make: *** [Makefile:273: mp-grav-sim-test] Error 2 ``` and the sources and run scripts: [report.zip](https://github.com/user-attachments/files/17752068/report.zip) In case it's helpful I could also push the code base to GitHub since it's just a side project.