llvm / llvm-project

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

crash in #pragma omp parallel for block #96853

Open Kicer86 opened 1 week ago

Kicer86 commented 1 week ago
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++ -cc1 -triple x86_64-pc-linux-gnu -emit-module-interface -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name images_aligner.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu alderlake -target-feature +prfchw -target-feature -cldemote -target-feature +avx -target-feature +aes -target-feature +sahf -target-feature +pclmul -target-feature -xop -target-feature +crc32 -target-feature +xsaves -target-feature -avx512fp16 -target-feature -sm4 -target-feature +sse4.1 -target-feature -avx512ifma -target-feature +xsave -target-feature -avx512pf -target-feature +sse4.2 -target-feature -tsxldtrk -target-feature +ptwrite -target-feature +widekl -target-feature -sm3 -target-feature +invpcid -target-feature +64bit -target-feature +xsavec -target-feature -avx512vpopcntdq -target-feature +cmov -target-feature -avx512vp2intersect -target-feature -avx512cd -target-feature +movbe -target-feature -avxvnniint8 -target-feature -avx512er -target-feature -amx-int8 -target-feature +kl -target-feature -sha512 -target-feature +avxvnni -target-feature -rtm -target-feature +adx -target-feature +avx2 -target-feature +hreset -target-feature +movdiri -target-feature +serialize -target-feature +vpclmulqdq -target-feature -avx512vl -target-feature -uintr -target-feature +clflushopt -target-feature -raoint -target-feature -cmpccxadd -target-feature +bmi -target-feature -amx-tile -target-feature +sse -target-feature +gfni -target-feature -avxvnniint16 -target-feature -amx-fp16 -target-feature +xsaveopt -target-feature +rdrnd -target-feature -avx512f -target-feature -amx-bf16 -target-feature -avx512bf16 -target-feature -avx512vnni -target-feature +cx8 -target-feature -avx512bw -target-feature +sse3 -target-feature +pku -target-feature +fsgsbase -target-feature -clzero -target-feature -mwaitx -target-feature -lwp -target-feature +lzcnt -target-feature +sha -target-feature +movdir64b -target-feature -wbnoinvd -target-feature -enqcmd -target-feature -prefetchwt1 -target-feature -avxneconvert -target-feature -tbm -target-feature -pconfig -target-feature -amx-complex -target-feature +ssse3 -target-feature +cx16 -target-feature +bmi2 -target-feature +fma -target-feature +popcnt -target-feature -avxifma -target-feature +f16c -target-feature -avx512bitalg -target-feature -rdpru -target-feature +clwb -target-feature +mmx -target-feature +sse2 -target-feature +rdseed -target-feature -avx512vbmi2 -target-feature -prefetchi -target-feature +rdpid -target-feature -fma4 -target-feature -avx512vbmi -target-feature +shstk -target-feature +vaes -target-feature +waitpkg -target-feature -sgx -target-feature +fxsr -target-feature -avx512dq -target-feature -sse4a -tune-cpu alderlake -debugger-tuning=gdb -fcoverage-compilation-dir=/home/michal/projects/sources/astro-stacker/build -resource-dir /usr/lib/clang/17 -dependency-file CMakeFiles/astro-stacker.dir/images_aligner.cpp.o.d -MT CMakeFiles/astro-stacker.dir/images_aligner.cpp.o -sys-header-deps -module-file-deps -isystem /usr/include/opencv4 -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1 -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/x86_64-pc-linux-gnu -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/backward -internal-isystem /usr/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../x86_64-pc-linux-gnu/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -W -Wall -Wextra -Wdouble-promotion -Wconversion -Wfloat-equal -Wformat=2 -Winit-self -Wpedantic -Wsequence-point -Wshadow -Wunused -Wundef -Wnull-dereference -Wold-style-cast -Wsuggest-override -std=c++20 -fdeprecated-macro -fdebug-compilation-dir=/home/michal/projects/sources/astro-stacker/build -ferror-limit 19 -fopenmp -stack-protector 2 -fgnuc-version=4.2.1 -fno-implicit-modules -fcxx-exceptions -fexceptions -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/astro-stacker.dir/images_aligner.pcm -x c++ /home/michal/projects/sources/astro-stacker/images_aligner.cpp
1.  /home/michal/projects/sources/astro-stacker/images_aligner.cpp:135:69: current parser token '['
2.  /home/michal/projects/sources/astro-stacker/images_aligner.cpp:112:1: parsing function body 'alignImages'
3.  /home/michal/projects/sources/astro-stacker/images_aligner.cpp:112:1: in compound statement ('{}')
4.  /home/michal/projects/sources/astro-stacker/images_aligner.cpp:126:5: in compound statement ('{}')
 #0 0x000071ae3d97bcb0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libLLVM-17.so+0x77bcb0)
 #1 0x000071ae3d978f1d (/usr/lib/libLLVM-17.so+0x778f1d)
 #2 0x000071ae3cc50ae0 (/usr/lib/libc.so.6+0x3cae0)
 #3 0x000071ae45778604 (/usr/lib/libclang-cpp.so.17+0x378604)
 #4 0x000071ae46503628 (/usr/lib/libclang-cpp.so.17+0x1103628)
 #5 0x000071ae4650617e clang::Sema::isOpenMPPrivateDecl(clang::ValueDecl*, unsigned int, unsigned int) const (/usr/lib/libclang-cpp.so.17+0x110617e)
 #6 0x000071ae4639165e clang::Sema::tryCaptureVariable(clang::ValueDecl*, clang::SourceLocation, clang::Sema::TryCaptureKind, clang::SourceLocation, bool, clang::QualType&, clang::QualType&, unsigned int const*) (/usr/lib/libclang-cpp.so.17+0xf9165e)
 #7 0x000071ae4635b2f1 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::NestedNameSpecifierLoc, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) (/usr/lib/libclang-cpp.so.17+0xf5b2f1)
 #8 0x000071ae4635b920 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::CXXScopeSpec const*, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) (/usr/lib/libclang-cpp.so.17+0xf5b920)
 #9 0x000071ae4635e039 clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::DeclarationNameInfo const&, clang::NamedDecl*, clang::NamedDecl*, clang::TemplateArgumentListInfo const*, bool) (/usr/lib/libclang-cpp.so.17+0xf5e039)
#10 0x000071ae4635e7d9 clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::LookupResult&, bool, bool) (/usr/lib/libclang-cpp.so.17+0xf5e7d9)
#11 0x000071ae4635f088 clang::Sema::ActOnIdExpression(clang::Scope*, clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&, bool, bool, clang::CorrectionCandidateCallback*, bool, clang::Token*) (/usr/lib/libclang-cpp.so.17+0xf5f088)
#12 0x000071ae45952f1a clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/usr/lib/libclang-cpp.so.17+0x552f1a)
#13 0x000071ae4793257d (/usr/lib/libclang-cpp.so.17+0x253257d)
#14 0x000071ae47932626 (/usr/lib/libclang-cpp.so.17+0x2532626)
#15 0x000071ae45959f39 clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&, llvm::function_ref<void ()>, bool, bool) (/usr/lib/libclang-cpp.so.17+0x559f39)
#16 0x000071ae4595f9ad clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/usr/lib/libclang-cpp.so.17+0x55f9ad)
#17 0x000071ae45952b17 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/usr/lib/libclang-cpp.so.17+0x552b17)
#18 0x000071ae4793257d (/usr/lib/libclang-cpp.so.17+0x253257d)
#19 0x000071ae47932626 (/usr/lib/libclang-cpp.so.17+0x2532626)
#20 0x000071ae4793277d (/usr/lib/libclang-cpp.so.17+0x253277d)
#21 0x000071ae459b3f50 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b3f50)
#22 0x000071ae459b2304 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b2304)
#23 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb)
#24 0x000071ae459b2a29 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b2a29)
#25 0x000071ae459b4bba clang::Parser::ParseIfStatement(clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b4bba)
#26 0x000071ae459b2208 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b2208)
#27 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb)
#28 0x000071ae459b7675 clang::Parser::ParseCompoundStatementBody(bool) (/usr/lib/libclang-cpp.so.17+0x5b7675)
#29 0x000071ae459b7c92 clang::Parser::ParseCompoundStatement(bool, unsigned int) (/usr/lib/libclang-cpp.so.17+0x5b7c92)
#30 0x000071ae459b1a1f clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b1a1f)
#31 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb)
#32 0x000071ae459b2a29 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b2a29)
#33 0x000071ae459b623b clang::Parser::ParseForStatement(clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b623b)
#34 0x000071ae459b21e1 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b21e1)
#35 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb)
#36 0x000071ae459b2a29 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b2a29)
#37 0x000071ae4597ce30 clang::Parser::ParseOpenMPDeclarativeOrExecutableDirective(clang::Parser::ParsedStmtContext, bool) (/usr/lib/libclang-cpp.so.17+0x57ce30)
#38 0x000071ae459b1b17 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b1b17)
#39 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb)
#40 0x000071ae459b7675 clang::Parser::ParseCompoundStatementBody(bool) (/usr/lib/libclang-cpp.so.17+0x5b7675)
#41 0x000071ae459b93aa clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/usr/lib/libclang-cpp.so.17+0x5b93aa)
#42 0x000071ae459ba3fc clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/usr/lib/libclang-cpp.so.17+0x5ba3fc)
#43 0x000071ae459161d0 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/usr/lib/libclang-cpp.so.17+0x5161d0)
#44 0x000071ae459a8009 (/usr/lib/libclang-cpp.so.17+0x5a8009)
#45 0x000071ae459becc2 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/usr/lib/libclang-cpp.so.17+0x5becc2)
#46 0x000071ae45920c17 clang::Parser::ParseExportDeclaration() (/usr/lib/libclang-cpp.so.17+0x520c17)
#47 0x000071ae459bed48 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/usr/lib/libclang-cpp.so.17+0x5bed48)
#48 0x000071ae459bf0ea clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/usr/lib/libclang-cpp.so.17+0x5bf0ea)
#49 0x000071ae458fbd99 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libclang-cpp.so.17+0x4fbd99)
#50 0x000071ae471c44f9 clang::FrontendAction::Execute() (/usr/lib/libclang-cpp.so.17+0x1dc44f9)
#51 0x000071ae471b0df7 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libclang-cpp.so.17+0x1db0df7)
#52 0x000071ae47293c92 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libclang-cpp.so.17+0x1e93c92)
#53 0x0000565685cc1c18 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+++0xec18)
#54 0x0000565685cc710f (/usr/bin/clang+++0x1410f)
#55 0x0000565685cc7c2e clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+++0x14c2e)
#56 0x0000565685cbdd54 main (/usr/bin/clang+++0xad54)
#57 0x000071ae3cc39c88 (/usr/lib/libc.so.6+0x25c88)
#58 0x000071ae3cc39d4c __libc_start_main (/usr/lib/libc.so.6+0x25d4c)
#59 0x0000565685cbdd95 _start (/usr/bin/clang+++0xad95)
clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 17.0.6
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/images_aligner-65e3f8.cppm
clang++: note: diagnostic msg: /tmp/images_aligner-65e3f8.sh
clang++: note: diagnostic msg: 

********************

images_aligner-65e3f8.zip

llvmbot commented 1 week ago

@llvm/issue-subscribers-clang-frontend

Author: Michał Walenciak (Kicer86)

``` 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++ -cc1 -triple x86_64-pc-linux-gnu -emit-module-interface -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name images_aligner.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu alderlake -target-feature +prfchw -target-feature -cldemote -target-feature +avx -target-feature +aes -target-feature +sahf -target-feature +pclmul -target-feature -xop -target-feature +crc32 -target-feature +xsaves -target-feature -avx512fp16 -target-feature -sm4 -target-feature +sse4.1 -target-feature -avx512ifma -target-feature +xsave -target-feature -avx512pf -target-feature +sse4.2 -target-feature -tsxldtrk -target-feature +ptwrite -target-feature +widekl -target-feature -sm3 -target-feature +invpcid -target-feature +64bit -target-feature +xsavec -target-feature -avx512vpopcntdq -target-feature +cmov -target-feature -avx512vp2intersect -target-feature -avx512cd -target-feature +movbe -target-feature -avxvnniint8 -target-feature -avx512er -target-feature -amx-int8 -target-feature +kl -target-feature -sha512 -target-feature +avxvnni -target-feature -rtm -target-feature +adx -target-feature +avx2 -target-feature +hreset -target-feature +movdiri -target-feature +serialize -target-feature +vpclmulqdq -target-feature -avx512vl -target-feature -uintr -target-feature +clflushopt -target-feature -raoint -target-feature -cmpccxadd -target-feature +bmi -target-feature -amx-tile -target-feature +sse -target-feature +gfni -target-feature -avxvnniint16 -target-feature -amx-fp16 -target-feature +xsaveopt -target-feature +rdrnd -target-feature -avx512f -target-feature -amx-bf16 -target-feature -avx512bf16 -target-feature -avx512vnni -target-feature +cx8 -target-feature -avx512bw -target-feature +sse3 -target-feature +pku -target-feature +fsgsbase -target-feature -clzero -target-feature -mwaitx -target-feature -lwp -target-feature +lzcnt -target-feature +sha -target-feature +movdir64b -target-feature -wbnoinvd -target-feature -enqcmd -target-feature -prefetchwt1 -target-feature -avxneconvert -target-feature -tbm -target-feature -pconfig -target-feature -amx-complex -target-feature +ssse3 -target-feature +cx16 -target-feature +bmi2 -target-feature +fma -target-feature +popcnt -target-feature -avxifma -target-feature +f16c -target-feature -avx512bitalg -target-feature -rdpru -target-feature +clwb -target-feature +mmx -target-feature +sse2 -target-feature +rdseed -target-feature -avx512vbmi2 -target-feature -prefetchi -target-feature +rdpid -target-feature -fma4 -target-feature -avx512vbmi -target-feature +shstk -target-feature +vaes -target-feature +waitpkg -target-feature -sgx -target-feature +fxsr -target-feature -avx512dq -target-feature -sse4a -tune-cpu alderlake -debugger-tuning=gdb -fcoverage-compilation-dir=/home/michal/projects/sources/astro-stacker/build -resource-dir /usr/lib/clang/17 -dependency-file CMakeFiles/astro-stacker.dir/images_aligner.cpp.o.d -MT CMakeFiles/astro-stacker.dir/images_aligner.cpp.o -sys-header-deps -module-file-deps -isystem /usr/include/opencv4 -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1 -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/x86_64-pc-linux-gnu -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/backward -internal-isystem /usr/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../x86_64-pc-linux-gnu/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -W -Wall -Wextra -Wdouble-promotion -Wconversion -Wfloat-equal -Wformat=2 -Winit-self -Wpedantic -Wsequence-point -Wshadow -Wunused -Wundef -Wnull-dereference -Wold-style-cast -Wsuggest-override -std=c++20 -fdeprecated-macro -fdebug-compilation-dir=/home/michal/projects/sources/astro-stacker/build -ferror-limit 19 -fopenmp -stack-protector 2 -fgnuc-version=4.2.1 -fno-implicit-modules -fcxx-exceptions -fexceptions -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/astro-stacker.dir/images_aligner.pcm -x c++ /home/michal/projects/sources/astro-stacker/images_aligner.cpp 1. /home/michal/projects/sources/astro-stacker/images_aligner.cpp:135:69: current parser token '[' 2. /home/michal/projects/sources/astro-stacker/images_aligner.cpp:112:1: parsing function body 'alignImages' 3. /home/michal/projects/sources/astro-stacker/images_aligner.cpp:112:1: in compound statement ('{}') 4. /home/michal/projects/sources/astro-stacker/images_aligner.cpp:126:5: in compound statement ('{}') #0 0x000071ae3d97bcb0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libLLVM-17.so+0x77bcb0) #1 0x000071ae3d978f1d (/usr/lib/libLLVM-17.so+0x778f1d) #2 0x000071ae3cc50ae0 (/usr/lib/libc.so.6+0x3cae0) #3 0x000071ae45778604 (/usr/lib/libclang-cpp.so.17+0x378604) #4 0x000071ae46503628 (/usr/lib/libclang-cpp.so.17+0x1103628) #5 0x000071ae4650617e clang::Sema::isOpenMPPrivateDecl(clang::ValueDecl*, unsigned int, unsigned int) const (/usr/lib/libclang-cpp.so.17+0x110617e) #6 0x000071ae4639165e clang::Sema::tryCaptureVariable(clang::ValueDecl*, clang::SourceLocation, clang::Sema::TryCaptureKind, clang::SourceLocation, bool, clang::QualType&, clang::QualType&, unsigned int const*) (/usr/lib/libclang-cpp.so.17+0xf9165e) #7 0x000071ae4635b2f1 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::NestedNameSpecifierLoc, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) (/usr/lib/libclang-cpp.so.17+0xf5b2f1) #8 0x000071ae4635b920 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::CXXScopeSpec const*, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) (/usr/lib/libclang-cpp.so.17+0xf5b920) #9 0x000071ae4635e039 clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::DeclarationNameInfo const&, clang::NamedDecl*, clang::NamedDecl*, clang::TemplateArgumentListInfo const*, bool) (/usr/lib/libclang-cpp.so.17+0xf5e039) #10 0x000071ae4635e7d9 clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::LookupResult&, bool, bool) (/usr/lib/libclang-cpp.so.17+0xf5e7d9) #11 0x000071ae4635f088 clang::Sema::ActOnIdExpression(clang::Scope*, clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&, bool, bool, clang::CorrectionCandidateCallback*, bool, clang::Token*) (/usr/lib/libclang-cpp.so.17+0xf5f088) #12 0x000071ae45952f1a clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/usr/lib/libclang-cpp.so.17+0x552f1a) #13 0x000071ae4793257d (/usr/lib/libclang-cpp.so.17+0x253257d) #14 0x000071ae47932626 (/usr/lib/libclang-cpp.so.17+0x2532626) #15 0x000071ae45959f39 clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&, llvm::function_ref<void ()>, bool, bool) (/usr/lib/libclang-cpp.so.17+0x559f39) #16 0x000071ae4595f9ad clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/usr/lib/libclang-cpp.so.17+0x55f9ad) #17 0x000071ae45952b17 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/usr/lib/libclang-cpp.so.17+0x552b17) #18 0x000071ae4793257d (/usr/lib/libclang-cpp.so.17+0x253257d) #19 0x000071ae47932626 (/usr/lib/libclang-cpp.so.17+0x2532626) #20 0x000071ae4793277d (/usr/lib/libclang-cpp.so.17+0x253277d) #21 0x000071ae459b3f50 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b3f50) #22 0x000071ae459b2304 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b2304) #23 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb) #24 0x000071ae459b2a29 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b2a29) #25 0x000071ae459b4bba clang::Parser::ParseIfStatement(clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b4bba) #26 0x000071ae459b2208 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b2208) #27 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb) #28 0x000071ae459b7675 clang::Parser::ParseCompoundStatementBody(bool) (/usr/lib/libclang-cpp.so.17+0x5b7675) #29 0x000071ae459b7c92 clang::Parser::ParseCompoundStatement(bool, unsigned int) (/usr/lib/libclang-cpp.so.17+0x5b7c92) #30 0x000071ae459b1a1f clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b1a1f) #31 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb) #32 0x000071ae459b2a29 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b2a29) #33 0x000071ae459b623b clang::Parser::ParseForStatement(clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b623b) #34 0x000071ae459b21e1 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b21e1) #35 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb) #36 0x000071ae459b2a29 clang::Parser::ParseStatement(clang::SourceLocation*, clang::Parser::ParsedStmtContext) (/usr/lib/libclang-cpp.so.17+0x5b2a29) #37 0x000071ae4597ce30 clang::Parser::ParseOpenMPDeclarativeOrExecutableDirective(clang::Parser::ParsedStmtContext, bool) (/usr/lib/libclang-cpp.so.17+0x57ce30) #38 0x000071ae459b1b17 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/usr/lib/libclang-cpp.so.17+0x5b1b17) #39 0x000071ae459b25cb clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/usr/lib/libclang-cpp.so.17+0x5b25cb) #40 0x000071ae459b7675 clang::Parser::ParseCompoundStatementBody(bool) (/usr/lib/libclang-cpp.so.17+0x5b7675) #41 0x000071ae459b93aa clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/usr/lib/libclang-cpp.so.17+0x5b93aa) #42 0x000071ae459ba3fc clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/usr/lib/libclang-cpp.so.17+0x5ba3fc) #43 0x000071ae459161d0 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/usr/lib/libclang-cpp.so.17+0x5161d0) #44 0x000071ae459a8009 (/usr/lib/libclang-cpp.so.17+0x5a8009) #45 0x000071ae459becc2 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/usr/lib/libclang-cpp.so.17+0x5becc2) #46 0x000071ae45920c17 clang::Parser::ParseExportDeclaration() (/usr/lib/libclang-cpp.so.17+0x520c17) #47 0x000071ae459bed48 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/usr/lib/libclang-cpp.so.17+0x5bed48) #48 0x000071ae459bf0ea clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/usr/lib/libclang-cpp.so.17+0x5bf0ea) #49 0x000071ae458fbd99 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libclang-cpp.so.17+0x4fbd99) #50 0x000071ae471c44f9 clang::FrontendAction::Execute() (/usr/lib/libclang-cpp.so.17+0x1dc44f9) #51 0x000071ae471b0df7 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libclang-cpp.so.17+0x1db0df7) #52 0x000071ae47293c92 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libclang-cpp.so.17+0x1e93c92) #53 0x0000565685cc1c18 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+++0xec18) #54 0x0000565685cc710f (/usr/bin/clang+++0x1410f) #55 0x0000565685cc7c2e clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+++0x14c2e) #56 0x0000565685cbdd54 main (/usr/bin/clang+++0xad54) #57 0x000071ae3cc39c88 (/usr/lib/libc.so.6+0x25c88) #58 0x000071ae3cc39d4c __libc_start_main (/usr/lib/libc.so.6+0x25d4c) #59 0x0000565685cbdd95 _start (/usr/bin/clang+++0xad95) clang++: error: unable to execute command: Segmentation fault (core dumped) clang++: error: clang frontend command failed due to signal (use -v to see invocation) clang version 17.0.6 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/images_aligner-65e3f8.cppm clang++: note: diagnostic msg: /tmp/images_aligner-65e3f8.sh clang++: note: diagnostic msg: ******************** ``` [images_aligner-65e3f8.zip](https://github.com/user-attachments/files/16008550/images_aligner-65e3f8.zip)
EugeneZelenko commented 1 week ago

Could you please try 18 or main branch? https://godbolt.org should be helpful.

Kicer86 commented 1 week ago

Works on main

Kicer86 commented 4 days ago

Crashes on 18.1.8