[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute
Nathan Chancellor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 6 16:36:43 PDT 2021
nathanchance added a comment.
I bisected a crash in the Linux kernel down to the reland commit (and it is not fixed as of https://github.com/llvm/llvm-project/commit/2249ecee8d9a6237f51485bd39f01ba031575987):
$ git bisect log
# bad: [bdaa181007a46d317a1665acb8234eddeee82815] [TwoAddressInstructionPass] Update existing physreg live intervals
# good: [d4b1cf8f9c48a49ab808df15c4ab378276a07b82] [OpenMP] Build device runtimes for sm_86
git bisect start 'bdaa181007a46d317a1665acb8234eddeee82815' 'd4b1cf8f9c48a49ab808df15c4ab378276a07b82'
# good: [f2703c3c3353031de8de8c465a59d31488b11fb3] [DAG] FoldConstantArithmetic - rename NumOps -> NumElts. NFC.
git bisect good f2703c3c3353031de8de8c465a59d31488b11fb3
# good: [c68183b81e5257186c9403cf91f8b958af7459bc] [gn build] Use `=` for of -fdebug-compilation-dir
git bisect good c68183b81e5257186c9403cf91f8b958af7459bc
# bad: [2d8ec3c61d3c2d47b303187bb882ca23544f6fc5] [libcxx] [test] Narrow down XFAILs regarding a MSVC mode specific bug to "windows-dll && msvc"
git bisect bad 2d8ec3c61d3c2d47b303187bb882ca23544f6fc5
# good: [97c899f3c5d9bbff2824b3252b21378bf96f3f3f] [mlir] Add callback to provide a pass pipeline to MlirOptMain
git bisect good 97c899f3c5d9bbff2824b3252b21378bf96f3f3f
# bad: [4070f305f9a0c488d7177754d77c0b367e8695bf] [mlir][DialectConversion] Legalize all live argument conversions
git bisect bad 4070f305f9a0c488d7177754d77c0b367e8695bf
# bad: [3466e00716e12e32fdb100e3fcfca5c2b3e8d784] Reland "[Attr] support btf_type_tag attribute"
git bisect bad 3466e00716e12e32fdb100e3fcfca5c2b3e8d784
# good: [f64580f8d2ce5e1161857f9c89c2eee7a74c5ab8] [AArch64][GISel] Optimize 8 and 16 bit variants of uaddo.
git bisect good f64580f8d2ce5e1161857f9c89c2eee7a74c5ab8
# first bad commit: [3466e00716e12e32fdb100e3fcfca5c2b3e8d784] Reland "[Attr] support btf_type_tag attribute"
`cvise` spits out:
$ cat efi.i
typedef unsigned long efi_query_variable_info_t(int);
typedef struct {
struct {
efi_query_variable_info_t __attribute__((regparm(0))) * query_variable_info;
};
} efi_runtime_services_t;
efi_runtime_services_t efi_0;
$ clang -m32 -O2 -c -o /dev/null efi.i
$ clang -m32 -O2 -g -c -o /dev/null efi.i
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -m32 -O2 -g -c -o /dev/null efi.i
1. <eof> parser at end of file
#0 0x0000000002b31d13 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2b31d13)
#1 0x0000000002b2fb3e llvm::sys::RunSignalHandlers() (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2b2fb3e)
#2 0x0000000002ab8d13 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
#3 0x0000000002ab8e8e CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#4 0x00007fa9dd533870 __restore_rt sigaction.c:0:0
#5 0x0000000002eaa00e clang::CodeGen::CGDebugInfo::CreateType(clang::FunctionType const*, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eaa00e)
#6 0x0000000002ea4598 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ea4598)
#7 0x0000000002ea7cc4 clang::CodeGen::CGDebugInfo::CreatePointerLikeType(llvm::dwarf::Tag, clang::Type const*, clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ea7cc4)
#8 0x0000000002eb6558 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eb6558)
#9 0x0000000002ea4598 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ea4598)
#10 0x0000000002eaa610 clang::CodeGen::CGDebugInfo::createFieldType(llvm::StringRef, clang::QualType, clang::SourceLocation, clang::AccessSpecifier, unsigned long, unsigned int, llvm::DIFile*, llvm::DIScope*, clang::RecordDecl const*, llvm::MDTupleTypedArrayWrapper<llvm::DINode>, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eaa610)
#11 0x0000000002eab3c0 clang::CodeGen::CGDebugInfo::CollectRecordNormalField(clang::FieldDecl const*, unsigned long, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DIType*, clang::RecordDecl const*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eab3c0)
#12 0x0000000002eab90c clang::CodeGen::CGDebugInfo::CollectRecordFields(clang::RecordDecl const*, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DICompositeType*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eab90c)
#13 0x0000000002eb111a clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eb111a)
#14 0x0000000002eb65bd clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eb65bd)
#15 0x0000000002ea4598 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ea4598)
#16 0x0000000002eaa610 clang::CodeGen::CGDebugInfo::createFieldType(llvm::StringRef, clang::QualType, clang::SourceLocation, clang::AccessSpecifier, unsigned long, unsigned int, llvm::DIFile*, llvm::DIScope*, clang::RecordDecl const*, llvm::MDTupleTypedArrayWrapper<llvm::DINode>, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eaa610)
#17 0x0000000002eab3c0 clang::CodeGen::CGDebugInfo::CollectRecordNormalField(clang::FieldDecl const*, unsigned long, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DIType*, clang::RecordDecl const*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eab3c0)
#18 0x0000000002eab90c clang::CodeGen::CGDebugInfo::CollectRecordFields(clang::RecordDecl const*, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DICompositeType*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eab90c)
#19 0x0000000002eb111a clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eb111a)
#20 0x0000000002eb65bd clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eb65bd)
#21 0x0000000002ea4598 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ea4598)
#22 0x0000000002ea9864 clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const*, llvm::DIFile*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ea9864)
#23 0x0000000002eb65f1 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2eb65f1)
#24 0x0000000002ea4598 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*, clang::TypeLoc) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ea4598)
#25 0x0000000002ebfe3a clang::CodeGen::CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable*, clang::VarDecl const*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ebfe3a)
#26 0x0000000002dea4cc clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*, bool) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2dea4cc)
#27 0x0000000002dec4a0 clang::CodeGen::CodeGenModule::EmitTentativeDefinition(clang::VarDecl const*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2dec4a0)
#28 0x0000000003f08882 clang::Sema::ActOnEndOfTranslationUnit() (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x3f08882)
#29 0x0000000003df2f8b clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x3df2f8b)
#30 0x0000000003ded45d clang::ParseAST(clang::Sema&, bool, bool) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x3ded45d)
#31 0x00000000035f4d50 clang::FrontendAction::Execute() (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x35f4d50)
#32 0x000000000356c7ff clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x356c7ff)
#33 0x00000000036a1a23 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x36a1a23)
#34 0x000000000183866b cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x183866b)
#35 0x00000000018361cd ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#36 0x0000000003402952 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::$_1>(long) Job.cpp:0:0
#37 0x0000000002ab8c27 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x2ab8c27)
#38 0x00000000034024b7 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x34024b7)
#39 0x00000000033ca628 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x33ca628)
#40 0x00000000033ca8f7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x33ca8f7)
#41 0x00000000033e2ef1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x33e2ef1)
#42 0x0000000001835ab1 main (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x1835ab1)
#43 0x00007fa9dcfd8b25 __libc_start_main (/usr/lib/libc.so.6+0x27b25)
#44 0x0000000001832ffe _start (/home/nathan/cbl/src/llvm-project/build/stage1/bin/clang-14+0x1832ffe)
clang-14: error: clang frontend command failed with exit code 139 (use -v to see invocation)
ClangBuiltLinux clang version 14.0.0 (https://github.com/llvm/llvm-project 3466e00716e12e32fdb100e3fcfca5c2b3e8d784)
Target: i386-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/nathan/cbl/src/llvm-project/build/stage1/bin
clang-14: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111199/new/
https://reviews.llvm.org/D111199
More information about the llvm-commits
mailing list