llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Frontend failed with exit code 139

Open devcrafter opened this issue 2 years ago • 2 comments

Report:

fatal error: too many errors emitted, stopping now [-ferror-limit=]                                                                                                                                                                                                                                                                                                                   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++-15 --target=x86_64-linux-gnu --sysroot=/home/ubuntu/git/ClickHouse/cmake/linux/../../contrib/sysroot/linux-x86_64/x86_64-linux-gnu/libc --gcc-toolchain=/home/ubuntu/git/ClickHouse/cmake/linux/../../contrib/sysroot/linux-x86_64 -std=c++20 -fdiagnostics-color=always -Xclang -fuse-ctor-homing -fsized-deallocation -gdwarf-aranges -pipe -mssse3 -msse4.1 -msse4.2 -mpclmul -mpopcnt -fasynchronous-unwind-tables -ffile-prefix-map=/home/ubuntu/git/ClickHouse=. -falign-functions=32 -mbranches-within-32B-boundaries -fdiagnostics-absolute-paths -fstrict-vtable-pointers -fexperimental-new-pass-manager -Wall -Wextra -Wframe-larger-than=65536 -Weverything -Wpedantic -Wno-zero-length-array -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-c++20-compat -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-implicit-int-float-conversion -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-disabled-macro-expansion -Wno-documentation-unknown-command -Wno-double-promotion -Wno-exit-time-destructors -Wno-float-equal -Wno-global-constructors -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-padded -Wno-switch-enum -Wno-undefined-func-template -Wno-unused-template -Wno-vla -Wno-weak-template-vtables -Wno-weak-vtables -Wno-thread-safety-negative -O2 -g -O3 -g -gdwarf-4 -fno-pie -std=gnu++20 -Werror -DANNOYLIB_MULTITHREADED_BUILD -DBOOST_ASIO_HAS_STD_INVOKE_RESULT=1 -DBOOST_ASIO_STANDALONE=1 -DCONFIGDIR=\"\" -DENABLE_ANNOY -DENABLE_MULTITARGET_CODE=1 -DHAS_RESERVED_IDENTIFIER -DHAVE_CONFIG_H -DLIBSASL_EXPORTS=1 -DLZ4_DISABLE_DEPRECATE_WARNINGS=1 -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1 -DPLUGINDIR=\"\" -DPOCO_ENABLE_CPP11 -DPOCO_HAVE_FD_EPOLL -DPOCO_OS_FAMILY_UNIX -DSASLAUTHD_CONF_FILE_DEFAULT=\"\" -DSTD_EXCEPTION_HAS_STACK_TRACE=1 -DUNALIGNED_OK -DWITH_COVERAGE=0 -DWITH_GZFILEOP -DX86_64 -DZLIB_COMPAT -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -I/home/ubuntu/git/ClickHouse/reldbg/includes/configs -I/home/ubuntu/git/ClickHouse/src -I/home/ubuntu/git/ClickHouse/reldbg/src -I/home/ubuntu/git/ClickHouse/reldbg/src/Core/include -I/home/ubuntu/git/ClickHouse/base/glibc-compatibility/memcpy -I/home/ubuntu/git/ClickHouse/base/base/.. -I/home/ubuntu/git/ClickHouse/reldbg/base/base/.. -I/home/ubuntu/git/ClickHouse/contrib/cctz/include -I/home/ubuntu/git/ClickHouse/base/pcg-random/. -I/home/ubuntu/git/ClickHouse/contrib/miniselect/include -I/home/ubuntu/git/ClickHouse/contrib/zstd/lib -I/home/ubuntu/git/ClickHouse/reldbg/contrib/cyrus-sasl-cmake -I/home/ubuntu/git/ClickHouse/contrib/lz4/lib -isystem /home/ubuntu/git/ClickHouse/contrib/libcxx/include -isystem /home/ubuntu/git/ClickHouse/contrib/libcxxabi/include -isystem /home/ubuntu/git/ClickHouse/contrib/libunwind/include -isystem /home/ubuntu/git/ClickHouse/contrib/libdivide/. -isystem /home/ubuntu/git/ClickHouse/contrib/jemalloc-cmake/include -isystem /home/ubuntu/git/ClickHouse/contrib/abseil-cpp -isystem /home/ubuntu/git/ClickHouse/contrib/croaring/cpp -
isystem /home/ubuntu/git/ClickHouse/contrib/croaring/include -isystem /home/ubuntu/git/ClickHouse/contrib/cityhash102/include -isystem /home/ubuntu/git/ClickHouse/contrib/boost -isystem /home/ubuntu/git/ClickHouse/contrib/poco/Net/include -isystem /home/ubuntu/git/ClickHouse/contrib/poco/Foundation/include -isystem /home/ubuntu/git/ClickHouse/contrib/poco/NetSSL_OpenSSL/i
nclude -isystem /home/ubuntu/git/ClickHouse/contrib/poco/Crypto/include -isystem /home/ubuntu/git/ClickHouse/contrib/boringssl/include -isystem /home/ubuntu/git/ClickHouse/contrib/poco/Util/include -isystem /home/ubuntu/git/ClickHouse/contrib/poco/JSON/include -isystem /home/ubuntu/git/ClickHouse/contrib/poco/XML/include -isystem /home/ubuntu/git/ClickHouse/contrib/replxx
/include -isystem /home/ubuntu/git/ClickHouse/contrib/fmtlib-cmake/../fmtlib/include -isystem /home/ubuntu/git/ClickHouse/contrib/magic_enum/include -isystem /home/ubuntu/git/ClickHouse/contrib/double-conversion -isystem /home/ubuntu/git/ClickHouse/contrib/dragonbox/include -isystem /home/ubuntu/git/ClickHouse/contrib/re2 -isystem /home/ubuntu/git/ClickHouse/reldbg/contri
b/re2-cmake -isystem /home/ubuntu/git/ClickHouse/contrib/zlib-ng -isystem /home/ubuntu/git/ClickHouse/reldbg/contrib/zlib-ng-cmake -isystem /home/ubuntu/git/ClickHouse/contrib/pdqsort -isystem /home/ubuntu/git/ClickHouse/contrib/xz/src/liblzma/api -isystem /home/ubuntu/git/ClickHouse/contrib/snappy -isystem /home/ubuntu/git/ClickHouse/reldbg/contrib/snappy-cmake -isystem
/home/ubuntu/git/ClickHouse/contrib/msgpack-c/include -isystem /home/ubuntu/git/ClickHouse/contrib/fast_float/include -isystem /home/ubuntu/git/ClickHouse/contrib/nats-io/src -isystem /home/ubuntu/git/ClickHouse/contrib/nats-io/src/adapters -isystem /home/ubuntu/git/ClickHouse/contrib/nats-io/src/include -isystem /home/ubuntu/git/ClickHouse/contrib/nats-io/src/unix -isyst
em /home/ubuntu/git/ClickHouse/contrib/libuv/include -isystem /home/ubuntu/git/ClickHouse/contrib/krb5/src/include -isystem /home/ubuntu/git/ClickHouse/reldbg/contrib/krb5-cmake/include -isystem /home/ubuntu/git/ClickHouse/contrib/NuRaft/include -isystem /home/ubuntu/git/ClickHouse/contrib/poco/MongoDB/include -isystem /home/ubuntu/git/ClickHouse/contrib/icu/icu4c/source/
i18n -isystem /home/ubuntu/git/ClickHouse/contrib/icu/icu4c/source/common -isystem /home/ubuntu/git/ClickHouse/contrib/capnproto/c++/src -isystem /home/ubuntu/git/ClickHouse/contrib/openldap-cmake/linux_x86_64/include -isystem /home/ubuntu/git/ClickHouse/contrib/openldap/include -isystem /home/ubuntu/git/ClickHouse/contrib/sparsehash-c11 -isystem /home/ubuntu/git/ClickHou
se/contrib/s2geometry/src -isystem /home/ubuntu/git/ClickHouse/contrib/AMQP-CPP/include -isystem /home/ubuntu/git/ClickHouse/contrib/AMQP-CPP -isystem /home/ubuntu/git/ClickHouse/contrib/sqlite-amalgamation -isystem /home/ubuntu/git/ClickHouse/contrib/libpqxx/include -isystem /home/ubuntu/git/ClickHouse/contrib/libpq -isystem /home/ubuntu/git/ClickHouse/contrib/libpq/incl
ude -isystem /home/ubuntu/git/ClickHouse/contrib/libstemmer_c/include -isystem /home/ubuntu/git/ClickHouse/contrib/wordnet-blast -isystem /home/ubuntu/git/ClickHouse/contrib/lemmagen-c/include -isystem /home/ubuntu/git/ClickHouse/contrib/simdjson/include -isystem /home/ubuntu/git/ClickHouse/contrib/rapidjson/include -isystem /home/ubuntu/git/ClickHouse/contrib/consistent-
hashing -isystem /home/ubuntu/git/ClickHouse/contrib/annoy/src -DNDEBUG -D OS_LINUX -nostdinc++ -c -o src/CMakeFiles/dbms.dir/Storages/MergeTree/ReplicatedMergeTreeSink.cpp.o /home/ubuntu/git/ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp
1.      /home/ubuntu/git/ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp:677:6: current parser token ')'
2.      /home/ubuntu/git/ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp:17:1: parsing namespace 'DB'
3.      /home/ubuntu/git/ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp:346:1: parsing function body 'DB::ReplicatedMergeTreeSink::commitPart'
4.      /home/ubuntu/git/ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp:346:1: in compound statement ('{}')
5.      /home/ubuntu/git/ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp:360:27: lambda expression parsing
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):
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x31)[0x7f1ecce94f21]
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x7f1ecce92c5e]
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0x106)[0x7f1ecce942d6]
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(+0xe25c3f)[0x7f1eccdb8c3f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f1ed69ae420]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(+0xdc530f)[0x7f1ed3ce930f]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(+0xdc884b)[0x7f1ed3cec84b]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(+0xd788f5)[0x7f1ed3c9c8f5]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZNK5clang4Expr22EvaluateAsConstantExprERNS0_10EvalResultERKNS_10ASTContextENS0_16ConstantExprKindE+0x3d1)[0x7f1ed3c9c571]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang4Sema30PopExpressionEvaluationContextEv+0x42f)[0x7f1ed43b2b5f]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang4Sema15BuildLambdaExprENS_14SourceLocationES1_PNS_4sema15LambdaScopeInfoE+0x175)[0x7f1ed4527c35]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang4Sema15ActOnLambdaExprENS_14SourceLocationEPNS_4StmtEPNS_5ScopeE+0x68)[0x7f1ed4527a88]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser36ParseLambdaExpressionAfterIntroducerERNS_16LambdaIntroducerE+0xe49)[0x7f1ed3a0a2e9]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser21ParseLambdaExpressionEv+0xca)[0x7f1ed3a07f0a]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser19ParseCastExpressionENS0_13CastParseKindEbRbNS0_13TypeCastStateEbPb+0x179a)[0x7f1ed39fa5fa]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser25ParseAssignmentExpressionENS0_13TypeCastStateE+0xe1)[0x7f1ed39f4e81]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser19ParseExpressionListERN4llvm15SmallVectorImplIPNS_4ExprEEERNS2_INS_14SourceLocationEEENS1_12function_refIFvvEEEbb+0x10a)[0x7f1ed3a00e2a]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser28ParsePostfixExpressionSuffixENS_12ActionResultIPNS_4ExprELb1EEE+0x14f4)[0x7f1ed39f7ea4]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser19ParseCastExpressionENS0_13CastParseKindEbRbNS0_13TypeCastStateEbPb+0xdf)[0x7f1ed39f8f3f]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser25ParseAssignmentExpressionENS0_13TypeCastStateE+0xe1)[0x7f1ed39f4e81]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser15ParseExpressionENS0_13TypeCastStateE+0x9)[0x7f1ed39f4d89]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser18ParseExprStatementENS0_17ParsedStmtContextE+0x46)[0x7f1ed3a541c6]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser42ParseStatementOrDeclarationAfterAttributesERN4llvm11SmallVectorIPNS_4StmtELj32EEENS0_17ParsedStmtContextEPNS_14SourceLocationERNS_16ParsedAttributesESB_+0x1b78)[0x7f1ed3a53ae8]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser27ParseStatementOrDeclarationERN4llvm11SmallVectorIPNS_4StmtELj32EEENS0_17ParsedStmtContextEPNS_14SourceLocationE+0x15f)[0x7f1ed3a51d5f]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser26ParseCompoundStatementBodyEb+0x7a0)[0x7f1ed3a5aa30]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser26ParseFunctionStatementBodyEPNS_4DeclERNS0_10ParseScopeE+0xb5)[0x7f1ed3a5ba65]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser23ParseFunctionDefinitionERNS_17ParsingDeclaratorERKNS0_18ParsedTemplateInfoEPNS0_18LateParsedAttrListE+0xe12)[0x7f1ed3a75d32]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser14ParseDeclGroupERNS_15ParsingDeclSpecENS_17DeclaratorContextERNS_16ParsedAttributesEPNS_14SourceLocationEPNS0_12ForRangeInitE+0x1408)[0x7f1ed39ca6d8]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser30ParseDeclOrFunctionDefInternalERNS_16ParsedAttributesERNS_15ParsingDeclSpecENS_15AccessSpecifierE+0x3aa)[0x7f1ed3a74d5a]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser36ParseDeclarationOrFunctionDefinitionERNS_16ParsedAttributesEPNS_15ParsingDeclSpecENS_15AccessSpecifierE+0x1a7)[0x7f1ed3a747b7]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser24ParseExternalDeclarationERNS_16ParsedAttributesEPNS_15ParsingDeclSpecE+0x80a)[0x7f1ed3a73ada]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser19ParseInnerNamespaceERKN4llvm11SmallVectorINS0_18InnerNamespaceInfoELj4EEEjRNS_14SourceLocationERNS_16ParsedAttributesERNS_24BalancedDelimiterTrackerE+0xd2)[0x7f1ed39decf2]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser14ParseNamespaceENS_17DeclaratorContextERNS_14SourceLocationES2_+0x12e6)[0x7f1ed39de636]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser16ParseDeclarationENS_17DeclaratorContextERNS_14SourceLocationERNS_16ParsedAttributesES5_PS2_+0x3c7)[0x7f1ed39c3e57]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser24ParseExternalDeclarationERNS_16ParsedAttributesEPNS_15ParsingDeclSpecE+0x11b)[0x7f1ed3a733eb]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6Parser17ParseTopLevelDeclERNS_9OpaquePtrINS_12DeclGroupRefEEERNS_4Sema17ModuleImportStateE+0x453)[0x7f1ed3a71da3]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang8ParseASTERNS_4SemaEbb+0x2ee)[0x7f1ed39b07ae]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang13CodeGenAction13ExecuteActionEv+0xd5)[0x7f1ed4ba1725]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang14FrontendAction7ExecuteEv+0x67)[0x7f1ed55d37a7]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x336)[0x7f1ed5547796]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x29a)[0x7f1ed56511aa]
/usr/bin/clang++-15(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x96f)[0x564fb167b91f]
/usr/bin/clang++-15(+0x11b1b)[0x564fb1679b1b]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(+0x2287772)[0x7f1ed51ab772]
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xde)[0x7f1eccdb899e]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x138)[0x7f1ed51ab238]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_b+0x44a)[0x7f1ed51703fa]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEEb+0x8e)[0x7f1ed517064e]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x39f)[0x7f1ed518d9cf]
/usr/bin/clang++-15(_Z10clang_mainiPPc+0x2c11)[0x564fb1679281]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f1ecba77083]
/usr/bin/clang++-15(_start+0x2e)[0x564fb167632e]
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Ubuntu clang version 15.0.2-++20221003113142+5f620d003fda-1~exp1~20221003113228.69
Target: x86_64-unknown-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/ReplicatedMergeTreeSink-b1f203.cpp
clang: note: diagnostic msg: /tmp/ReplicatedMergeTreeSink-b1f203.sh
clang: note: diagnostic msg:

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

Archive.zip

devcrafter avatar Oct 06 '22 22:10 devcrafter

@llvm/issue-subscribers-clang-frontend

llvmbot avatar Oct 06 '22 22:10 llvmbot

Strange, I get "fatal error: too many errors emitted, stopping now", but I can't reproduce the crash...

nicolas17 avatar Oct 17 '22 04:10 nicolas17

The original code is reproduced with -std=gnu++20 -DOS_LINUX -DNDEBUG.

Crashes on clang 15. https://godbolt.org/z/1jbnd4Msx

backtrace

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: /opt/compiler-explorer/clang-15.0.0/bin/clang++ -gdwarf-4 -g -o /app/output.s -c --gcc-toolchain=/opt/compiler-explorer/gcc-12.2.0 -fcolor-diagnostics -fno-crash-diagnostics -std=gnu++2b -stdlib=libc++ -fexperimental-library <source>
1.	<source>:50:4: current parser token ')'
2.	<source>:21:1: parsing function body 'func'
3.	<source>:21:1: in compound statement ('{}')
4.	<source>:23:15: lambda expression parsing
 #0 0x00005579fc995f84 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x00005579fc993dac llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x38c8dac)
 #2 0x00005579fc8d1be8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007ff922053420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00005579ffd05c78 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::RecordExprEvaluator, bool>::Visit(clang::Stmt const*) ExprConstant.cpp:0:0
 #5 0x00005579ffd07658 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::RecordExprEvaluator, bool>::Visit(clang::Stmt const*) ExprConstant.cpp:0:0
 #6 0x00005579ffce48b1 EvaluateInPlace(clang::APValue&, (anonymous namespace)::EvalInfo&, (anonymous namespace)::LValue const&, clang::Expr const*, bool) ExprConstant.cpp:0:0
 #7 0x00005579ffd1fe10 clang::Expr::EvaluateAsConstantExpr(clang::Expr::EvalResult&, clang::ASTContext const&, clang::Expr::ConstantExprKind) const (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x6c54e10)
 #8 0x00005579ff271a85 clang::Sema::PopExpressionEvaluationContext() (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x61a6a85)
 #9 0x00005579ff4296c7 clang::Sema::BuildLambdaExpr(clang::SourceLocation, clang::SourceLocation, clang::sema::LambdaScopeInfo*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x635e6c7)
#10 0x00005579ff431427 clang::Sema::ActOnLambdaExpr(clang::SourceLocation, clang::Stmt*, clang::Scope*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x6366427)
#11 0x00005579fee094a5 clang::Parser::ParseLambdaExpressionAfterIntroducer(clang::LambdaIntroducer&) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d3e4a5)
#12 0x00005579fee09d6b clang::Parser::ParseLambdaExpression() (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d3ed6b)
#13 0x00005579fede76e4 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d1c6e4)
#14 0x00005579fede96be clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d1e6be)
#15 0x00005579fede98ad clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d1e8ad)
#16 0x00005579fede9b87 clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&, llvm::SmallVectorImpl<clang::SourceLocation>&, llvm::function_ref<void ()>, bool, bool) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d1eb87)
#17 0x00005579fedee7ec clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d237ec)
#18 0x00005579fede6b97 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d1bb97)
#19 0x00005579fede96be clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d1e6be)
#20 0x00005579fede98ad clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d1e8ad)
#21 0x00005579fedee19d clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d2319d)
#22 0x00005579fee6dc2e clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5da2c2e)
#23 0x00005579fee62f45 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d97f45)
#24 0x00005579fee63923 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d98923)
#25 0x00005579fee64846 clang::Parser::ParseCompoundStatementBody(bool) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d99846)
#26 0x00005579fee65c12 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5d9ac12)
#27 0x00005579fed8b4b4 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5cc04b4)
#28 0x00005579fedbb14f clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5cf014f)
#29 0x00005579fed85aa5 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5cbaaa5)
#30 0x00005579fed86a20 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.0) Parser.cpp:0:0
#31 0x00005579fed8e4f6 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5cc34f6)
#32 0x00005579fed8f90a clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5cc490a)
#33 0x00005579fed7f0ba clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x5cb40ba)
#34 0x00005579fdbb2cc5 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x4ae7cc5)
#35 0x00005579fd4bb1d1 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x43f01d1)
#36 0x00005579fd442ed3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x4377ed3)
#37 0x00005579fd599adb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x44ceadb)
#38 0x00005579fa2f0b64 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x1225b64)
#39 0x00005579fa2ea10b ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#40 0x00005579fd2ac969 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#41 0x00005579fc8d1ce7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x3806ce7)
#42 0x00005579fd2acf5c clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#43 0x00005579fd276fce clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x41abfce)
#44 0x00005579fd2779ed clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x41ac9ed)
#45 0x00005579fd28283c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x41b783c)
#46 0x00005579fa2ee8e9 clang_main(int, char**) (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x12238e9)
#47 0x00007ff921b01083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#48 0x00005579fa2e9d1e _start (/opt/compiler-explorer/clang-15.0.0/bin/clang+++0x121ed1e)
clang-15: error: clang frontend command failed with exit code 139 (use -v to see invocation)

k-mana avatar Apr 13 '23 19:04 k-mana

This no longer reproduces on trunk: https://godbolt.org/z/KaffvKna5

nor clang-16

Thank you @k-mana for reducing the test case!

shafik avatar Apr 13 '23 19:04 shafik