trying to test out ClangBuiltLinux/boot-utils#44 and I'm hitting a failed assertion:
failed assertion in kernel/fork.c 'Machine Copy Propagation Pass' on function '@copy_init_mm' aspeed_g5_defconfig
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LLVM=1 LLVM_IAS=1 -j72 aspeed_g5_defconfig kernel/fork.o
...
clang: ../include/llvm/CodeGen/MachineRegisterInfo.h:830: void llvm::MachineRegisterInfo::updateDbgUsersToReg(llvm::Register, ArrayRef<llvm::MachineInstr *>) const: Assertion `MI->getOperand(0).isReg()' failed.
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 -Wp,-MMD,kernel/.fork.o.d -nostdinc -isystem /android0/llvm-project/llvm/build/lib/clang/13.0.0/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -Qunused-arguments -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 --target=arm-linux-gnueabihf --prefix=/usr/bin/arm-linux-gnueabihf- --gcc-toolchain=/usr -Werror=unknown-warning-option -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mfpu=vfp -funwind-tables -meabi gnu -marm -Wa,-W -D__LINUX_ARM_ARCH__=6 -march=armv6k -mtune=arm1136j-s -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu -mno-global-merge -Wno-unused-const-variable -g -gdwarf-4 -fno-var-tracking -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-pointer-to-enum-cast -Wno-tautological-constant-out-of-range-compare -DKBUILD_MODFILE=\"kernel/fork\" -DKBUILD_BASENAME=\"fork\" -DKBUILD_MODNAME=\"fork\" -D__KBUILD_MODNAME=kmod_fork -c -o kernel/fork.o kernel/fork.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'kernel/fork.c'.
4. Running pass 'Machine Copy Propagation Pass' on function '@copy_init_mm'
#0 0x0000000004a14c43 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/android0/llvm-project/llvm/build/bin/clang-13+0x4a14c43)
#1 0x0000000004a1298e llvm::sys::RunSignalHandlers() (/android0/llvm-project/llvm/build/bin/clang-13+0x4a1298e)
#2 0x0000000004a13fed llvm::sys::CleanupOnSignal(unsigned long) (/android0/llvm-project/llvm/build/bin/clang-13+0x4a13fed)
#3 0x0000000004989123 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
#4 0x000000000498928e CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#5 0x00007fe8e924e140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#6 0x00007fe8e8d26ce1 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#7 0x00007fe8e8d10537 abort ./stdlib/abort.c:81:7
#8 0x00007fe8e8d1040f get_sysdep_segment_value ./intl/loadmsgcat.c:509:8
#9 0x00007fe8e8d1040f _nl_load_domain ./intl/loadmsgcat.c:970:34
#10 0x00007fe8e8d1f662 (/lib/x86_64-linux-gnu/libc.so.6+0x34662)
#11 0x0000000004018cb0 (anonymous namespace)::MachineCopyPropagation::runOnMachineFunction(llvm::MachineFunction&) MachineCopyPropagation.cpp:0:0
#12 0x0000000003d4aa2e llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/android0/llvm-project/llvm/build/bin/clang-13+0x3d4aa2e)
#13 0x00000000041c8e88 llvm::FPPassManager::runOnFunction(llvm::Function&) (/android0/llvm-project/llvm/build/bin/clang-13+0x41c8e88)
#14 0x00000000041cf688 llvm::FPPassManager::runOnModule(llvm::Module&) (/android0/llvm-project/llvm/build/bin/clang-13+0x41cf688)
#15 0x00000000041c9537 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/android0/llvm-project/llvm/build/bin/clang-13+0x41c9537)
#16 0x0000000004c93c5b (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
#17 0x0000000004c8caab clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/android0/llvm-project/llvm/build/bin/clang-13+0x4c8caab)
#18 0x000000000540d72f clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) CodeGenAction.cpp:0:0
#19 0x0000000005c59643 clang::ParseAST(clang::Sema&, bool, bool) (/android0/llvm-project/llvm/build/bin/clang-13+0x5c59643)
#20 0x0000000005354463 clang::FrontendAction::Execute() (/android0/llvm-project/llvm/build/bin/clang-13+0x5354463)
#21 0x00000000052c4583 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/android0/llvm-project/llvm/build/bin/clang-13+0x52c4583)
#22 0x00000000054076dc clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/android0/llvm-project/llvm/build/bin/clang-13+0x54076dc)
#23 0x0000000002cea74f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/android0/llvm-project/llvm/build/bin/clang-13+0x2cea74f)
#24 0x0000000002ce856d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#25 0x00000000051608a2 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
#26 0x0000000004989041 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/android0/llvm-project/llvm/build/bin/clang-13+0x4989041)
#27 0x00000000051602a7 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/android0/llvm-project/llvm/build/bin/clang-13+0x51602a7)
#28 0x0000000005128f04 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/android0/llvm-project/llvm/build/bin/clang-13+0x5128f04)
#29 0x0000000005129447 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/android0/llvm-project/llvm/build/bin/clang-13+0x5129447)
#30 0x0000000005142a58 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/android0/llvm-project/llvm/build/bin/clang-13+0x5142a58)
#31 0x0000000002ce7e33 main (/android0/llvm-project/llvm/build/bin/clang-13+0x2ce7e33)
#32 0x00007fe8e8d11d0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#33 0x0000000002ce523a _start (/android0/llvm-project/llvm/build/bin/clang-13+0x2ce523a)
clang-13: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Nick Desaulniers clang version 13.0.0 (git@github.com:llvm/llvm-project.git 12c51f23584252974b63180b7915e6e6f8df87de)
Target: arm-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /android0/llvm-project/llvm/build/bin
clang-13: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/fork-4a2bf8.c
clang-13: note: diagnostic msg: /tmp/fork-4a2bf8.sh
clang-13: note: diagnostic msg:
********************
make[2]: *** [scripts/Makefile.build:271: kernel/fork.o] Error 134
make[1]: *** [Makefile:1851: kernel] Error 2
make: *** [Makefile:335: __build_one_by_one] Error 2
trying to test out ClangBuiltLinux/boot-utils#44 and I'm hitting a failed assertion:
failed assertion in kernel/fork.c 'Machine Copy Propagation Pass' on function '@copy_init_mm' aspeed_g5_defconfig