llvm / llvm-project

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

Clang segfaults in clang::CXXRecordDecl::getNumBases when compiling C++2b #55508

Closed jfgoog closed 6 months ago

jfgoog commented 2 years ago

This is an upstream bug for Android NDK bug https://github.com/android/ndk/issues/1685.

I am attaching same .zip file from that bug, which has the source code and compilation command: Review.zip

This bug was originally reported with version 24.0.8215888, for which clang++ -v reports:

Android (8075178, based on r437112b) clang version 14.0.1 (https://android.googlesource.com/toolchain/llvm-project 8671348b81b95fc603505dfc881b45103bee1731)

I have reproduce the crash with clang built at head (clang version 15.0.0 (git@github.com:llvm/llvm-project.git 7272a8c23ceb218b3bd6f0dd303c6df2c773cc74), built with cmake -GNinja ../llvm -DLLVM_ENABLE_PROJECTS="clang;compiler-rt;lld;clang-tools-extra;libcxx;libcxxabi" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_INCLUDE_GO_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo), albeit with a different stack trace:

Stack dump:
0.      Program arguments: bin/clang++ -cc1 -triple i686-none-linux-android21 -emit-obj --mrelax-relocations -mnoexecstack -disable-free -disable-llvm-verifier -discard-value-names -main-file-name Review.cpp -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fno-rounding-math -mconstructor-aliases -target-cpu i686 -target-feature +ssse3 -tune-cpu generic -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -target-linker-version 711 -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/Users/MB/Documents/unicorn_client_release/build/unicorn.android/app/.cxx/QA/4o3t1451/x86 -sys-header-deps -D CHEATS=1 -D NDEBUG -D QA_BACKEND=1 -D WEBP_USE_THREAD -D _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS -D client_EXPORTS -D ANDROID -D _FORTIFY_SOURCE=2 -O3 -Wfatal-errors -std=gnu++2b -fdeprecated-macro -fdebug-compilation-dir=/Users/MB/Documents/unicorn_client_release/build/unicorn.android/app/.cxx/QA/4o3t1451/x86 -ferror-limit 19 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 2 -mstackrealign -fno-rtti -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -vectorize-loops -vectorize-slp -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++ /usr/local/google/home/jamesfarrell/bugs/ld-crash/Review-91221b.cpp
1.      <eof> parser at end of file
2.      /Users/MB/Documents/unicorn_client_release/clientsdk/igl/headers/igl/math/softfp.h:24:1: parsing namespace 'iugo'
3.      /Users/MB/Documents/unicorn_client_release/clientsdk/igl/headers/igl/math/softfp.h:146:3: parsing struct/union/class body 'iugo::softfp'
4.      /Users/MB/Documents/unicorn_client_release/clientsdk/igl/headers/igl/math/softfp.h:347:5: parsing function body 'iugo::softfp::frac'
 #0 0x00000000025c86b3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:13
 #1 0x00000000025c6a40 llvm::sys::RunSignalHandlers() /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/lib/Support/Signals.cpp:104:18
 #2 0x00000000025c8a3a SignalHandler(int) /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
 #3 0x00007f03f5d9d200 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12200)
 #4 0x000000000477415b clang::CXXRecordDecl::getNumBases() const /usr/local/google/home/jamesfarrell/src/llvm-project/clang/include/clang/AST/DeclCXX.h:590:48
 #5 0x000000000477415b getDefaultInitValue(clang::QualType, clang::APValue&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/AST/ExprConstant.cpp:4802:51
 #6 0x00000000047954a4 EvaluateVarDecl((anonymous namespace)::EvalInfo&, clang::VarDecl const*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/AST/ExprConstant.cpp:0:12
 #7 0x0000000004795531 EvaluateDecl((anonymous namespace)::EvalInfo&, clang::Decl const*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/AST/ExprConstant.cpp:4883:11
 #8 0x0000000004793a33 EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/AST/ExprConstant.cpp:5217:34
 #9 0x0000000004793953 EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/AST/ExprConstant.cpp:5247:11
#10 0x0000000004777e11 HandleFunctionCall(clang::SourceLocation, clang::FunctionDecl const*, (anonymous namespace)::LValue const*, llvm::ArrayRef<clang::Expr const*>, (anonymous namespace)::CallRef, clang::Stmt const*, (anonymous namespace)::EvalInfo&, clang::APValue&, (anonymous namespace)::LValue const*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/AST/ExprConstant.cpp:6201:24
#11 0x0000000004777908 clang::Expr::isPotentialConstantExpr(clang::FunctionDecl const*, llvm::SmallVectorImpl<std::pair<clang::SourceLocation, clang::PartialDiagnostic>>&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/AST/ExprConstant.cpp:0:0
#12 0x0000000003f2a0d2 CheckConstexprFunctionBody(clang::Sema&, clang::FunctionDecl const*, clang::Stmt*, clang::Sema::CheckConstexprKind) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:2390:7
#13 0x0000000003f2a0d2 clang::Sema::CheckConstexprFunctionDefinition(clang::FunctionDecl const*, clang::Sema::CheckConstexprKind) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:1814:10
#14 0x0000000003ebc896 clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Sema/SemaDecl.cpp:15203:11
#15 0x0000000003d57635 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseStmt.cpp:2388:18
#16 0x0000000003cbf947 clang::Token::isNot(clang::tok::TokenKind) const /usr/local/google/home/jamesfarrell/src/llvm-project/clang/include/clang/Lex/Token.h:98:52
#17 0x0000000003cbf947 clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:598:14
#18 0x0000000003cbe66a clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:527:33
#19 0x0000000003cecb41 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3569:21
#20 0x0000000003ceaacb clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:0:7
#21 0x0000000003ccc615 llvm::PointerIntPair<void*, 1u, int, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::ParsedAttr*, llvm::SmallVector<clang::ParsedAttr*, 4u>*>, llvm::PointerIntPairInfo<void*, 1u, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::ParsedAttr*, llvm::SmallVector<clang::ParsedAttr*, 4u>*>>>::getPointer() const /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:60:58
#22 0x0000000003ccc615 llvm::PointerUnion<clang::ParsedAttr*, llvm::SmallVector<clang::ParsedAttr*, 4u>*>::isNull() const /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/include/llvm/ADT/PointerUnion.h:142:43
#23 0x0000000003ccc615 llvm::TinyPtrVector<clang::ParsedAttr*>::empty() const /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/include/llvm/ADT/TinyPtrVector.h:166:13
#24 0x0000000003ccc615 clang::ParsedAttributesView::empty() const /usr/local/google/home/jamesfarrell/src/llvm-project/clang/include/clang/Sema/ParsedAttr.h:904:40
#25 0x0000000003ccc615 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseDecl.cpp:4103:23
#26 0x0000000003cb5b4d clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/Parser.cpp:1071:10
#27 0x0000000003cb571b clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/Parser.cpp:1172:12
#28 0x0000000003cb4ba7 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/Parser.cpp:0:12
#29 0x0000000003ce3e30 clang::AttributePool::~AttributePool() /usr/local/google/home/jamesfarrell/src/llvm-project/clang/include/clang/Sema/ParsedAttr.h:799:22
#30 0x0000000003ce3e30 clang::ParsedAttributes::~ParsedAttributes() /usr/local/google/home/jamesfarrell/src/llvm-project/clang/include/clang/Sema/ParsedAttr.h:995:7
#31 0x0000000003ce3e30 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:257:5
#32 0x0000000003ce3903 clang::Parser::ParseScope::Exit() /usr/local/google/home/jamesfarrell/src/llvm-project/clang/include/clang/Parse/Parser.h:1120:15
#33 0x0000000003ce3903 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:237:18
#34 0x0000000003ccb951 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::SourceLocation*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseDecl.cpp:1787:12
#35 0x0000000003cb4487 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/Parser.cpp:0:3
#36 0x0000000003cb2cc3 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/Parser.cpp:727:10
#37 0x0000000003caec7e clang::ParseAST(clang::Sema&, bool, bool) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Parse/ParseAST.cpp:161:5
#38 0x0000000002dc1008 clang::FrontendAction::Execute() /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1036:10
#39 0x0000000002d46c76 llvm::Error::getPtr() const /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/include/llvm/Support/Error.h:274:12
#40 0x0000000002d46c76 llvm::Error::operator bool() /usr/local/google/home/jamesfarrell/src/llvm-project/llvm/include/llvm/Support/Error.h:234:16
#41 0x0000000002d46c76 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1036:23
#42 0x0000000002e6bf41 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:266:25
#43 0x00000000009ef096 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/tools/driver/cc1_main.cpp:248:15
#44 0x00000000009ecf68 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /usr/local/google/home/jamesfarrell/src/llvm-project/clang/tools/driver/driver.cpp:317:12
#45 0x00000000009ecddf main /usr/local/google/home/jamesfarrell/src/llvm-project/clang/tools/driver/driver.cpp:388:12
#46 0x00007f03f57f47fd __libc_start_main ./csu/../csu/libc-start.c:332:16
#47 0x00000000009ea0da _start (bin/clang+++0x9ea0da)
Segmentation fault
llvmbot commented 2 years ago

@llvm/issue-subscribers-c-2b

llvmbot commented 2 years ago

@llvm/issue-subscribers-clang-frontend

MartinX3 commented 2 years ago

I can confirm the random crashes while compiling Android 13. It worked with Android 12 before.

[ 74% 61768/82647] //frameworks/wilhelm/src:libwilhelm clang++ itf/IVirtualizer.cpp
FAILED: out/soong/.intermediates/frameworks/wilhelm/src/libwilhelm/android_arm64_armv8-2a_shared/obj/frameworks/wilhelm/src/itf/IVirtualizer.o
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++ -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-
self -Wpointer-arith -Wunreachable-code-loop-increment -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fdebug-default-version=5 -fno-strict-alias
ing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=string-plus-int -Werror=unreachable-code-loop-increment -D__compiler_offsetof=__builtin
_offsetof -faddrsig -fcommon -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted
 -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-gnu-designator -Wno-gnu-folding-constant -Wunguarded-availability -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -ffp-c
ontract=off -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sections -fdata-
sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werro
r=address -Werror=sequence-point -Werror=format-security -nostdlibinc -fdebug-info-for-profiling -march=armv8.2-a  -target aarch64-linux-android10000 -DANDROID_STRICT -fPIC -Ws
ign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden  -Iframeworks/wilhelm/src -D__LIBANDROIDICU_API__=
10000 -D__LIBC_API__=10000 -D__LIBM_API__=10000 -D__LIBDL_API__=10000 -Ilibnativehelper/include_jni -Iframeworks/av/media/libmediametrics/include -Iframeworks/wilhelm/include -
Iframeworks/av/media/libstagefright/mpeg2ts/include -Iframeworks/native/headers/media_plugin -Iframeworks/native/headers/media_plugin/media/openmax -Iframeworks/av/media/libsta
gefright/include -Isystem/core/libcutils/include -Isystem/core/libutils/include -Isystem/unwinding/libbacktrace/include -Isystem/libbase/include -Iexternal/fmtlib/include -Isys
tem/logging/liblog/include -Isystem/core/libprocessgroup/include -Isystem/core/libsystem/include -Iframeworks/av/media/libstagefright/foundation/include -Iframeworks/wilhelm/sr
c/ut -Iexternal/libcxxabi/include -Iframeworks/native/libs/binder/include -Iframeworks/native/libs/binder/ndk/include_cpp -Iout/soong/.intermediates/frameworks/native/libs/bind
er/libbinder/android_arm64_armv8-2a_shared/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/permission/framework-permission-aidl-cpp-source/gen/include -Iframeworks/a
v/media/libmedia/include -Iframeworks/av/media/ndk/include -Iframeworks/native/libs/binder/ndk/include_ndk -Iframeworks/native/libs/binder/ndk/include_platform -Iout/soong/.int
ermediates/frameworks/av/services/mediaresourcemanager/resourcemanager_aidl_interface-ndk-source/gen/include -Iexternal/icu/libandroidicu/include -Iframeworks/av/media/libaudio
client/include -Iframeworks/av/media/libaudiofoundation/include -Iframeworks/av/media/liberror/include -Isystem/media/audio/include -Iframeworks/av/media/libmediahelper/include
 -Iout/soong/.intermediates/frameworks/base/media/android.media.audio.common.types-V1-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audio
client-types-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/av-types-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libshmem/s
hared-file-region-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/effect-aidl-cpp-source/gen/include -Iout/soong/.intermediates/framew
orks/av/media/libaudioclient/audioflinger-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audiopolicy-types-aidl-cpp-source/gen/includ
e -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/capture_state_listener-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient
/spatializer-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audiopolicy-aidl-cpp-source/gen/include -Iout/soong/.intermediates/framew
orks/av/media/libaudioclient/libaudioclient/android_arm64_armv8-2a_static_cfi/gen/aidl -Iframeworks/av/media/libmedia/aidl -Isystem/libhidl/transport/token/1.0/utils/include -I
system/libhidl/base/include -Isystem/libhidl/transport/include -Isystem/libfmq/base -Isystem/libhwbinder/include -Iout/soong/.intermediates/system/libhidl/transport/manager/1.0
/android.hidl.manager@1.0_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/manager/1.1/android.hidl.manager@1.1_genc++_headers/gen -Iout/soong/.intermedia
tes/system/libhidl/transport/manager/1.2/android.hidl.manager@1.2_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/base/1.0/android.hidl.base@1.0_genc++_h
eaders/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.0/android.hardware.graphics.common@1.0_genc++_headers/gen -Iout/soong/.intermediates/hardware/interf
aces/media/1.0/android.hardware.media@1.0_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/bufferqueue/1.0/android.hardware.graphics.bufferqueue@1.0_g
enc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/media/omx/1.0/android.hardware.media.omx@1.0_genc++_headers/gen -Iframeworks/native/libs/ui/include -Iframework
s/native/libs/ui/include_private -Iframeworks/native/libs/nativebase/include -Iframeworks/native/libs/nativewindow/include -Ihardware/libhardware/include -Ipackages/modules/Blu
etooth/system/types -Iframeworks/native/libs/math/include -Iframeworks/native/libs/ui/include_mock -Iframeworks/native/libs/ui/include_types -Iframeworks/native/libs/arect/incl
ude -Iout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common-V2-ndk-source/gen/include -Iout/soong/.intermediates/hardware/interfaces/graphics/common/
aidl/android.hardware.graphics.common-V3-ndk-source/gen/include -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.1/android.hardware.graphics.common@1.1_genc++_h
eaders/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.2/android.hardware.graphics.common@1.2_genc++_headers/gen -Iout/soong/.intermediates/hardware/interf
aces/graphics/mapper/4.0/android.hardware.graphics.mapper@4.0_genc++_headers/gen -Iframeworks/native/libs/gralloc/types/include -Iout/soong/.intermediates/frameworks/av/media/l
ibmedia/libmedia_omx/android_arm64_armv8-2a_shared_cfi/gen/aidl -Iout/soong/.intermediates/frameworks/av/media/libmedia/libmedia/android_arm64_armv8-2a_static_cfi/gen/aidl -Ifr
ameworks/av/media/libdatasource/include -Iframeworks/native/libs/gui/include -Iout/soong/.intermediates/hardware/interfaces/graphics/bufferqueue/2.0/android.hardware.graphics.b
ufferqueue@2.0_genc++_headers/gen -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_aidl_static/android_arm64_armv8-2a_static/gen/aidl -Iout/soong/.intermediates/fra
meworks/native/libs/gui/sysprop/libLibGuiProperties/android_arm64_armv8-2a_static_lto-thin/gen/sysprop/include -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_aidl
_static/android_arm64_armv8-2a_static_lto-thin/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_window_info_static/android_arm64_armv8-2a_static_lto-thin/g
en/aidl -Iframeworks/native/opengl/libs/EGL/include -Iframeworks/native/opengl/include -Iframeworks/native/libs/nativewindow/include-private -Iout/soong/.intermediates/framewor
ks/native/libs/gui/libgui/android_arm64_armv8-2a_shared/gen/aidl -Isystem/libhidl/libhidlmemory/include -Iout/soong/.intermediates/system/libhidl/transport/memory/1.0/android.h
idl.memory@1.0_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/memory/token/1.0/android.hidl.memory.token@1.0_genc++_headers/gen -Iout/soong/.intermediat
es/system/libhidl/transport/allocator/1.0/android.hidl.allocator@1.0_genc++_headers/gen -Iframeworks/base/core/jni -Iframeworks/base/core/jni/include -Ilibnativehelper/header_o
nly_include -Ilibnativehelper/include -Ilibnativehelper/include_platform -Ilibnativehelper/include_platform_header_only -Iframeworks/av/media/libstagefright/http -Iexternal/lib
cxx/include -Ibionic/libc/async_safe/include -Ibionic/libc/system_properties/include -Isystem/core/property_service/libpropertyinfoparser/include -isystem bionic/libc/include -
isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -DUSE_PROFILES=0 -D
USE_TRACE -UNDEBUG -DUSE_LOG=SLAndroidLogLevel_Info -fvisibility=hidden '-DLI_API=__attribute__((visibility("default")))' -Wno-multichar -Wno-invalid-offsetof -Wall -Wextra -Wn
o-unused-parameter -Werror -DPLATFORM_SDK_VERSION=33 -std=gnu++17 -fno-rtti -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/audio/include -Ihardware/libhar
dware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include  -Werror=bool-
operation -Werror=implicit-int-float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=string-compare -Werror=xor-used-as-p
ow -Wno-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautologic
al-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-
deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-string-compare -Wno-pess
imizing-move -Wno-non-c-typedef-for-linkage -Wno-align-mismatch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -MD -MF out/soong/.intermediates/framewor
ks/wilhelm/src/libwilhelm/android_arm64_armv8-2a_shared/obj/frameworks/wilhelm/src/itf/IVirtualizer.o.d -o out/soong/.intermediates/frameworks/wilhelm/src/libwilhelm/android_ar
m64_armv8-2a_shared/obj/frameworks/wilhelm/src/itf/IVirtualizer.o frameworks/wilhelm/src/itf/IVirtualizer.cpp
PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real -c -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-un
used -Winit-self -Wpointer-arith -Wunreachable-code-loop-increment -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fdebug-default-version=5 -fno-
strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=string-plus-int -Werror=unreachable-code-loop-increment -D__compiler_offset
of=__builtin_offsetof -faddrsig -fcommon -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-func
tion-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-gnu-designator -Wno-gnu-folding-constant -Wunguarded-availability -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_W
EAK__ -ffp-contract=off -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sect
ions -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual
-dtor -Werror=address -Werror=sequence-point -Werror=format-security -nostdlibinc -fdebug-info-for-profiling -march=armv8.2-a -target aarch64-linux-android10000 -DANDROID_STRIC
T -fPIC -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden -Iframeworks/wilhelm/src -D__LIBANDROID
ICU_API__=10000 -D__LIBC_API__=10000 -D__LIBM_API__=10000 -D__LIBDL_API__=10000 -Ilibnativehelper/include_jni -Iframeworks/av/media/libmediametrics/include -Iframeworks/wilhelm
/include -Iframeworks/av/media/libstagefright/mpeg2ts/include -Iframeworks/native/headers/media_plugin -Iframeworks/native/headers/media_plugin/media/openmax -Iframeworks/av/me
dia/libstagefright/include -Isystem/core/libcutils/include -Isystem/core/libutils/include -Isystem/unwinding/libbacktrace/include -Isystem/libbase/include -Iexternal/fmtlib/inc
lude -Isystem/logging/liblog/include -Isystem/core/libprocessgroup/include -Isystem/core/libsystem/include -Iframeworks/av/media/libstagefright/foundation/include -Iframeworks/
wilhelm/src/ut -Iexternal/libcxxabi/include -Iframeworks/native/libs/binder/include -Iframeworks/native/libs/binder/ndk/include_cpp -Iout/soong/.intermediates/frameworks/native
/libs/binder/libbinder/android_arm64_armv8-2a_shared/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/permission/framework-permission-aidl-cpp-source/gen/include -Ifr
ameworks/av/media/libmedia/include -Iframeworks/av/media/ndk/include -Iframeworks/native/libs/binder/ndk/include_ndk -Iframeworks/native/libs/binder/ndk/include_platform -Iout/
soong/.intermediates/frameworks/av/services/mediaresourcemanager/resourcemanager_aidl_interface-ndk-source/gen/include -Iexternal/icu/libandroidicu/include -Iframeworks/av/medi
a/libaudioclient/include -Iframeworks/av/media/libaudiofoundation/include -Iframeworks/av/media/liberror/include -Isystem/media/audio/include -Iframeworks/av/media/libmediahelp
er/include -Iout/soong/.intermediates/frameworks/base/media/android.media.audio.common.types-V1-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudiocl
ient/audioclient-types-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/av-types-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/
libshmem/shared-file-region-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/effect-aidl-cpp-source/gen/include -Iout/soong/.intermedia
tes/frameworks/av/media/libaudioclient/audioflinger-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audiopolicy-types-aidl-cpp-source/
gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/capture_state_listener-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/liba
udioclient/spatializer-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audiopolicy-aidl-cpp-source/gen/include -Iout/soong/.intermedia
tes/frameworks/av/media/libaudioclient/libaudioclient/android_arm64_armv8-2a_static_cfi/gen/aidl -Iframeworks/av/media/libmedia/aidl -Isystem/libhidl/transport/token/1.0/utils/
include -Isystem/libhidl/base/include -Isystem/libhidl/transport/include -Isystem/libfmq/base -Isystem/libhwbinder/include -Iout/soong/.intermediates/system/libhidl/transport/m
anager/1.0/android.hidl.manager@1.0_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/manager/1.1/android.hidl.manager@1.1_genc++_headers/gen -Iout/soong/.
intermediates/system/libhidl/transport/manager/1.2/android.hidl.manager@1.2_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/base/1.0/android.hidl.base@1.
0_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.0/android.hardware.graphics.common@1.0_genc++_headers/gen -Iout/soong/.intermediates/hardw
are/interfaces/media/1.0/android.hardware.media@1.0_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/bufferqueue/1.0/android.hardware.graphics.bufferq
ueue@1.0_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/media/omx/1.0/android.hardware.media.omx@1.0_genc++_headers/gen -Iframeworks/native/libs/ui/include -
Iframeworks/native/libs/ui/include_private -Iframeworks/native/libs/nativebase/include -Iframeworks/native/libs/nativewindow/include -Ihardware/libhardware/include -Ipackages/m
odules/Bluetooth/system/types -Iframeworks/native/libs/math/include -Iframeworks/native/libs/ui/include_mock -Iframeworks/native/libs/ui/include_types -Iframeworks/native/libs/
arect/include -Iout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common-V2-ndk-source/gen/include -Iout/soong/.intermediates/hardware/interfaces/graphi
cs/common/aidl/android.hardware.graphics.common-V3-ndk-source/gen/include -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.1/android.hardware.graphics.common@1.
1_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.2/android.hardware.graphics.common@1.2_genc++_headers/gen -Iout/soong/.intermediates/hardw
are/interfaces/graphics/mapper/4.0/android.hardware.graphics.mapper@4.0_genc++_headers/gen -Iframeworks/native/libs/gralloc/types/include -Iout/soong/.intermediates/frameworks/
av/media/libmedia/libmedia_omx/android_arm64_armv8-2a_shared_cfi/gen/aidl -Iout/soong/.intermediates/frameworks/av/media/libmedia/libmedia/android_arm64_armv8-2a_static_cfi/gen
/aidl -Iframeworks/av/media/libdatasource/include -Iframeworks/native/libs/gui/include -Iout/soong/.intermediates/hardware/interfaces/graphics/bufferqueue/2.0/android.hardware.
graphics.bufferqueue@2.0_genc++_headers/gen -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_aidl_static/android_arm64_armv8-2a_static/gen/aidl -Iout/soong/.interme
diates/frameworks/native/libs/gui/sysprop/libLibGuiProperties/android_arm64_armv8-2a_static_lto-thin/gen/sysprop/include -Iout/soong/.intermediates/frameworks/native/libs/gui/l
ibgui_aidl_static/android_arm64_armv8-2a_static_lto-thin/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_window_info_static/android_arm64_armv8-2a_static_
lto-thin/gen/aidl -Iframeworks/native/opengl/libs/EGL/include -Iframeworks/native/opengl/include -Iframeworks/native/libs/nativewindow/include-private -Iout/soong/.intermediate
s/frameworks/native/libs/gui/libgui/android_arm64_armv8-2a_shared/gen/aidl -Isystem/libhidl/libhidlmemory/include -Iout/soong/.intermediates/system/libhidl/transport/memory/1.0
/android.hidl.memory@1.0_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/memory/token/1.0/android.hidl.memory.token@1.0_genc++_headers/gen -Iout/soong/.i
ntermediates/system/libhidl/transport/allocator/1.0/android.hidl.allocator@1.0_genc++_headers/gen -Iframeworks/base/core/jni -Iframeworks/base/core/jni/include -Ilibnativehelpe
r/header_only_include -Ilibnativehelper/include -Ilibnativehelper/include_platform -Ilibnativehelper/include_platform_header_only -Iframeworks/av/media/libstagefright/http -Iex
ternal/libcxx/include -Ibionic/libc/async_safe/include -Ibionic/libc/system_properties/include -Isystem/core/property_service/libpropertyinfoparser/include -isystem bionic/libc
/include -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -DUSE_PRO
FILES=0 -DUSE_TRACE -UNDEBUG -DUSE_LOG=SLAndroidLogLevel_Info -fvisibility=hidden -DLI_API=__attribute__((visibility(\"default\"))) -Wno-multichar -Wno-invalid-offsetof -Wall -
Wextra -Wno-unused-parameter -Werror -DPLATFORM_SDK_VERSION=33 -std=gnu++17 -fno-rtti -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/audio/include -Ihardw
are/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -Wer
ror=bool-operation -Werror=implicit-int-float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=string-compare -Werror=xor-
used-as-pow -Wno-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-t
autological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-sizeof-array-div -Wno-tautological-overlap-comp
are -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-string-compare 
-Wno-pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-mismatch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -MD -MF out/soong/.intermediates
/frameworks/wilhelm/src/libwilhelm/android_arm64_armv8-2a_shared/obj/frameworks/wilhelm/src/itf/IVirtualizer.o.d -o out/soong/.intermediates/frameworks/wilhelm/src/libwilhelm/a
ndroid_arm64_armv8-2a_shared/obj/frameworks/wilhelm/src/itf/IVirtualizer.o frameworks/wilhelm/src/itf/IVirtualizer.cpp
1.  <eof> parser at end of file
2.  external/libcxx/include/map:1126:18: instantiating function definition 'std::map<audio_encapsulation_type_t, std::set<std::vector<unsigned char>>>::operator[]'
3.  external/libcxx/include/__tree:1143:5: instantiating function definition 'std::__tree<std::__value_type<audio_encapsulation_type_t, std::set<std::vector<unsigned char>>
>, std::__map_value_compare<audio_encapsulation_type_t, std::__value_type<audio_encapsulation_type_t, std::set<std::vector<unsigned char>>>, std::less<audio_encapsulation_type_
t>, true>, std::allocator<std::__value_type<audio_encapsulation_type_t, std::set<std::vector<unsigned char>>>>>::__emplace_unique_key_args<audio_encapsulation_type_t, const std
::piecewise_construct_t &, std::tuple<const audio_encapsulation_type_t &>, std::tuple<>>'
 #0 0x00000000047d3da8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x47d3da8)
 #1 0x00000000047d2f10 llvm::sys::RunSignalHandlers() (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x47d2f10)
 #2 0x000000000479e993 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x479e993)
 #3 0x000000000479eb71 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x479eb71)
 #4 0x00007fd914a4fa40 (/usr/lib/libc.so.6+0x38a40)
 #5 0x0000000005c090dc (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5c090dc)
 #6 0x0000000005c096b5 llvm::FoldingSetBase::FindNodeOrInsertPos(llvm::FoldingSetNodeID const&, void*&, llvm::FoldingSetBase::FoldingSetInfo const&) (prebuilts/clang/host/linux
-x86/clang-r450784d/bin/clang++.real+0x5c096b5)
 #7 0x0000000005d7e5ed clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword, clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo const&, clang::S
ourceLocation, bool) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5d7e5ed)
 #8 0x00000000025f3f54 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x25f3f54)
 #9 0x00000000025f20ef (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x25f20ef)
#10 0x0000000005c9dbf7 clang::Sema::SubstType(clang::QualType, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName) (prebuilts/clang/hos
t/linux-x86/clang-r450784d/bin/clang++.real+0x5c9dbf7)
#11 0x0000000005c3918f clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation, clang::TemplateArgumentListInfo&) (prebuilts/clang/host/linux-x86/clang-r450
784d/bin/clang++.real+0x5c3918f)
#12 0x00000000025579bf (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x25579bf)
#13 0x0000000005c4d4c0 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5c4d4c0)
#14 0x0000000005e3d6a4 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5e3d6a4)
#15 0x0000000005c96174 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5c96174)
#16 0x000000000256453f (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x256453f)
#17 0x00000000025f21b1 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x25f21b1)
#18 0x0000000005c9dbf7 clang::Sema::SubstType(clang::QualType, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName) (prebuilts/clang/hos
t/linux-x86/clang-r450784d/bin/clang++.real+0x5c9dbf7)
#19 0x0000000005c15571 clang::Sema::CheckTemplateArgument(clang::NamedDecl*, clang::TemplateArgumentLoc&, clang::NamedDecl*, clang::SourceLocation, clang::SourceLocation, unsig
ned int, llvm::SmallVectorImpl<clang::TemplateArgument>&, clang::Sema::CheckTemplateArgumentKind) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5c15571)
#20 0x0000000005c9c814 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5c9c814)
#21 0x0000000005c99f59 clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::FunctionDecl*&,
 clang::sema::TemplateDeductionInfo&, bool, llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5c99f5
9)
#22 0x0000000005e59599 clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*, clang::DeclAccessPair, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Ex
pr*>, clang::OverloadCandidateSet&, bool, bool, bool, clang::CallExpr::ADLCallKind, clang::OverloadCandidateParamOrder) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang
++.real+0x5e59599)
#23 0x0000000005ce5645 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5ce5645)
#24 0x00000000062c42fe (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x62c42fe)
#25 0x0000000005db0533 clang::InitializationSequence::InitializeFrom(clang::Sema&, clang::InitializedEntity const&, clang::InitializationKind const&, llvm::MutableArrayRef<clan
g::Expr*>, bool, bool) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5db0533)
#26 0x0000000005e566f7 clang::Sema::BuildCXXTypeConstructExpr(clang::TypeSourceInfo*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, bool) (
prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5e566f7)
#27 0x0000000005e55f7e (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5e55f7e)
#28 0x0000000005d17219 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5d17219)
#29 0x00000000060e8bfb (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x60e8bfb)
#30 0x0000000005ea1581 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (prebuilts/clang/host/linux-x86/clang-r450784d/
bin/clang++.real+0x5ea1581)
#31 0x0000000005ea0c48 clang::Sema::PerformPendingInstantiations(bool) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5ea0c48)
#32 0x0000000005ea16ac clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (prebuilts/clang/host/linux-x86/clang-r450784d/
bin/clang++.real+0x5ea16ac)
#33 0x0000000005ea0c48 clang::Sema::PerformPendingInstantiations(bool) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5ea0c48)
#34 0x000000000619bf72 clang::Sema::ActOnEndOfTranslationUnitFragment(clang::Sema::TUFragmentKind) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x619bf72)
#35 0x00000000062bf9ef clang::Sema::ActOnEndOfTranslationUnit() (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x62bf9ef)
#36 0x0000000005ea258a clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5ea258a)
#37 0x0000000005ea22b2 clang::ParseAST(clang::Sema&, bool, bool) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x5ea22b2)
#38 0x000000000639ee0d clang::FrontendAction::Execute() (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x639ee0d)
#39 0x000000000639ecad clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x639ecad)
#40 0x000000000639f0c1 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x639f0c1)
#41 0x0000000006687454 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x6687454)
#42 0x00000000066842e3 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x66842e3)
#43 0x0000000006684192 (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x6684192)
#44 0x0000000006684161 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x6684161)
#45 0x0000000006683ef4 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::
allocator<char> >*, bool*) const (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x6683ef4)
#46 0x0000000006683d5f clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (prebuilts/clang/host/linux-x86/clang-r45
0784d/bin/clang++.real+0x6683d5f)
#47 0x0000000006683bf2 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) (preb
uilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x6683bf2)
#48 0x0000000006655f2e main (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x6655f2e)
#49 0x00007fd914a3a2d0 (/usr/lib/libc.so.6+0x232d0)
#50 0x00007fd914a3a38a __libc_start_main (/usr/lib/libc.so.6+0x2338a)
#51 0x00000000064b2f69 _start (prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++.real+0x64b2f69)
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Android (8490178, based on r450784d) clang version 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
Target: aarch64-unknown-linux-android10000
Thread model: posix
InstalledDir: prebuilts/clang/host/linux-x86/clang-r450784d/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: /home/developer/android/rom/sonyAOSP/13/out/soong/.temp/IVirtualizer-896bc7.cpp
clang++: note: diagnostic msg: /home/developer/android/rom/sonyAOSP/13/out/soong/.temp/IVirtualizer-896bc7.sh
clang++: note: diagnostic msg: 

********************
03:00:59 ninja failed with: exit status 1
stephenhines commented 2 years ago

@MartinX3 That's a different kind of crash because it is unrelated to C++2xb and the specific other crash mentioned above. Can you get the preprocessed source + command line for one of these crashes and file a new bug at https://github.com/android/ndk/issues?

MartinX3 commented 2 years ago

@stephenhines I try if it happens again, since it happens randomly. I need to restart the aosp compilation several times until it finish completely.

Are there instructions to collect the needed source code and command line stuff?

stephenhines commented 2 years ago

https://llvm.org/docs/HowToSubmitABug.html has the upstream LLVM instructions, but you can see in your logs that it should have saved off the preprocessed files in your temp directory already (and you don't need to do any more reducing there):

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang++: note: diagnostic msg: /home/developer/android/rom/sonyAOSP/13/out/soong/.temp/IVirtualizer-896bc7.cpp clang++: note: diagnostic msg: /home/developer/android/rom/sonyAOSP/13/out/soong/.temp/IVirtualizer-896bc7.sh clang++: note: diagnostic msg:

If you can include those on a bug report, it makes it way easier for us to reproduce the problem and fix it. Thanks for raising your concerns here. I hope that you don't encounter further crashes, but if you do, hopefully it isn't too difficult to find the crashing source files to upload.

MartinX3 commented 2 years ago

Thank you, sadly the second build attempt seemed to wipe the .temp folder.

vient commented 1 year ago

Encountered what looks like the same bug while using clangd in VSCode with -std=c++2b flag. Switching to c++2a seemingly fixed the problem.

I would've liked to send more info if there was any but clangd log contained only the stacktrace which I symbolized with llvm-addr2line:

llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) at /home/runner/work/clangd/clangd/llvm-project/llvm/lib/Support/Unix/Signals.inc:565
llvm::sys::RunSignalHandlers() at /home/runner/work/clangd/clangd/llvm-project/llvm/lib/Support/Signals.cpp:104
SignalHandler(int) at /home/runner/work/clangd/clangd/llvm-project/llvm/lib/Support/Unix/Signals.inc:407
__restore_rt at ??:0
getNumBases at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/AST/DeclCXX.h:590
 (inlined by) getDefaultInitValue(clang::QualType, clang::APValue&) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/AST/ExprConstant.cpp:4797
EvaluateVarDecl((anonymous namespace)::EvalInfo&, clang::VarDecl const*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/AST/ExprConstant.cpp:4859
EvaluateDecl((anonymous namespace)::EvalInfo&, clang::Decl const*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/AST/ExprConstant.cpp:4878
EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/AST/ExprConstant.cpp:5212
EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/AST/ExprConstant.cpp:5242
HandleFunctionCall(clang::SourceLocation, clang::FunctionDecl const*, (anonymous namespace)::LValue const*, llvm::ArrayRef<clang::Expr const*>, (anonymous namespace)::CallRef, clang::Stmt const*, (anonymous namespace)::EvalInfo&, clang::APValue&, (anonymous namespace)::LValue const*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/AST/ExprConstant.cpp:6200
clang::Expr::isPotentialConstantExpr(clang::FunctionDecl const*, llvm::SmallVectorImpl<std::pair<clang::SourceLocation, clang::PartialDiagnostic>>&) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/AST/ExprConstant.cpp:15946
CheckConstexprFunctionBody at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:2390
 (inlined by) clang::Sema::CheckConstexprFunctionDefinition(clang::FunctionDecl const*, clang::Sema::CheckConstexprKind) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:1814
clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Sema/SemaDecl.cpp:15340
clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:2437
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:0
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseDecl.cpp:2121
clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1179
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1193
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1019
~AttributePool at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:810
 (inlined by) ~ParsedAttributes at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:1012
 (inlined by) clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:259
Exit at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/Parse/Parser.h:1122
 (inlined by) clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:239
clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseDecl.cpp:0
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:0
~AttributePool at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:810
 (inlined by) ~ParsedAttributes at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:1012
 (inlined by) clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:259
Exit at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/Parse/Parser.h:1122
 (inlined by) clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:239
clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseDecl.cpp:0
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:0
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:737
clang::ParseAST(clang::Sema&, bool, bool) at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Parse/ParseAST.cpp:161
clang::FrontendAction::Execute() at /home/runner/work/clangd/clangd/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1041
operator bool at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/Support/Error.h:235
 (inlined by) clang::clangd::BackgroundIndex::index(clang::tooling::CompileCommand) at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/index/Background.cpp:322
_M_data at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:187
 (inlined by) _M_is_local at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:222
 (inlined by) _M_dispose at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:231
 (inlined by) ~basic_string at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:658
 (inlined by) ~CompileCommand at /home/runner/work/clangd/clangd/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h:44
 (inlined by) operator() at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/index/Background.cpp:165
 (inlined by) __invoke_impl<void, (lambda at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/index/Background.cpp:158:27) &> at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:60
 (inlined by) __invoke_r<void, (lambda at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/index/Background.cpp:158:27) &> at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:153
 (inlined by) std::_Function_handler<void (), clang::clangd::BackgroundIndex::indexFileTask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)::$_3>::_M_invoke(std::_Any_data const&) at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:291
clang::clangd::BackgroundQueue::work(std::function<void ()>) at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/index/BackgroundQueue.cpp:43
~_Function_base at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:244
 (inlined by) operator() at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/index/Background.cpp:111
 (inlined by) void llvm::detail::UniqueFunctionBase<void>::CallImpl<clang::clangd::BackgroundIndex::BackgroundIndex(clang::clangd::ThreadsafeFS const&, clang::clangd::GlobalCompilationDatabase const&, llvm::unique_function<clang::clangd::BackgroundIndexStorage* (llvm::StringRef)>, clang::clangd::BackgroundIndex::Options)::$_1>(void*) at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:222
PointerIntPair at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:49
 (inlined by) UniqueFunctionBase at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:340
 (inlined by) unique_function at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:369
 (inlined by) operator() at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:102
 (inlined by) Apply<(lambda at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:97:15)> at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42
 (inlined by) GenericThreadProxy<std::tuple<(lambda at /home/runner/work/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:97:15)> > at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:50
 (inlined by) void* llvm::thread::ThreadProxy<std::tuple<clang::clangd::AsyncTaskRunner::runAsync(llvm::Twine const&, llvm::unique_function<void ()>)::$_1>>(void*) at /home/runner/work/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:60
start_thread at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:478 (discriminator 6)

It happened with clangd 15.0.6.

appujee commented 6 months ago

is this still happening?

MartinX3 commented 6 months ago

In my case i don't see it in A14.

appujee commented 6 months ago

Should we close it then?

MartinX3 commented 6 months ago

In my case probably yes. Maybe also since I'm the only one responding here.

cor3ntin commented 6 months ago

Feel free to reopen if the issue is still reproducible for you on trunk