[llvm-bugs] [Bug 48142] New: Clang rGa8e50f1c6e7b crashes in LoopVectorizationPlanner::buildVPlanWithVPRecipes when building the arm64 Linux kernel
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 10 14:44:58 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48142
Bug ID: 48142
Summary: Clang rGa8e50f1c6e7b crashes in
LoopVectorizationPlanner::buildVPlanWithVPRecipes when
building the arm64 Linux kernel
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: florian_hahn at apple.com
Reporter: samitolvanen at google.com
CC: david.green at arm.com, llvm-bugs at lists.llvm.org,
ndesaulniers at google.com
Starting with commit a8e50f1c6e7b404aab8fedb972f003a4d6a6434e ("[VPlan] Use
VPValue def for VPWidenSelectRecipe.") Clang crashes when building the arm64
Linux kernel:
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: CC drivers/hwmon/hwmon.o
clang -Wp,-MMD,drivers/net/wireless/broadcom/brcm80211/brcmfmac/.cfg80211.o.d
-nostdinc -isystem unified-llvm/testbuild-release/lib/clang/12.0.0/include
-I../arch/arm64/include -I./arch/arm64/include/generated -I../include
-I./include -I../arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi
-I../include/uapi -I./include/generated/uapi -include
../include/linux/kconfig.h -include ../include/linux/compiler_types.h
-D__KERNEL__ -mlittle-endian -DKASAN_SHADOW_SCALE_SHIFT=3 -Qunused-arguments
-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=aarch64-linux-gnu --prefix=/usr/bin/aarch64-linux-gnu-
--gcc-toolchain=/usr -Werror=unknown-warning-option -mgeneral-regs-only
-DCONFIG_CC_HAS_K_CONSTRAINT=1 -Wno-psabi -fno-asynchronous-unwind-tables
-fno-unwind-tables -mbranch-protection=pac-ret+leaf+bti -Wa,-march=armv8.4-a
-DARM64_ASM_ARCH="armv8.4-a" -DKASAN_SHADOW_SCALE_SHIFT=3
-fno-delete-null-pointer-checks -Wno-frame-address
-Wno-address-of-packed-member -O2 -Wframe-larger-than=2048
-fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu
-mno-global-merge -Wno-unused-const-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wvla
-Wno-pointer-sign -Wno-array-bounds -fno-strict-overflow -fno-stack-check
-Werror=date-time -Werror=incompatible-pointer-types -fmacro-prefix-map=../=
-Wno-initializer-overrides -Wno-format -Wno-sign-compare
-Wno-format-zero-length -Wno-pointer-to-enum-cast
-Wno-tautological-constant-out-of-range-compare -I
../drivers/net/wireless/broadcom/brcm80211/brcmfmac -I
../drivers/net/wireless/broadcom/brcm80211/brcmfmac/../include -I
../drivers/net/wireless/broadcom/brcm80211/brcmfmac -I
./drivers/net/wireless/broadcom/brcm80211/brcmfmac -DMODULE
-DKBUILD_BASENAME="cfg80211" -DKBUILD_MODNAME="brcmfmac" -c -o
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.o
../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module
'../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c'.
4. Running pass 'Loop Vectorization' on function '@brcmf_cfg80211_attach'
#0 0x0000000002ac62b3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(unified-llvm/testbuild-release/bin/clang-12+0x2ac62b3)
#1 0x0000000002ac40ee llvm::sys::RunSignalHandlers()
(unified-llvm/testbuild-release/bin/clang-12+0x2ac40ee)
#2 0x0000000002ac5724 llvm::sys::CleanupOnSignal(unsigned long)
(unified-llvm/testbuild-release/bin/clang-12+0x2ac5724)
#3 0x0000000002a48de0 CrashRecoverySignalHandler(int)
(unified-llvm/testbuild-release/bin/clang-12+0x2a48de0)
#4 0x00007fc8eea9e140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#5 0x0000000002c03ece
llvm::LoopVectorizationPlanner::buildVPlanWithVPRecipes(llvm::VFRange&,
llvm::SmallPtrSetImpl<llvm::Value*>&,
llvm::SmallPtrSetImpl<llvm::Instruction*>&, llvm::DenseMap<llvm::Instruction*,
llvm::Instruction*, llvm::DenseMapInfo<llvm::Instruction*>,
llvm::detail::DenseMapPair<llvm::Instruction*, llvm::Instruction*> > const&)
(unified-llvm/testbuild-release/bin/clang-12+0x2c03ece)
#6 0x0000000002bfcfe5
llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount,
llvm::ElementCount) (unified-llvm/testbuild-release/bin/clang-12+0x2bfcfe5)
#7 0x0000000002bfc619 llvm::LoopVectorizationPlanner::plan(llvm::ElementCount,
unsigned int) (unified-llvm/testbuild-release/bin/clang-12+0x2bfc619)
#8 0x0000000002c07635 llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(unified-llvm/testbuild-release/bin/clang-12+0x2c07635)
#9 0x0000000002c0a237 llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*)
(unified-llvm/testbuild-release/bin/clang-12+0x2c0a237)
#10 0x0000000002c0e9be (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
(unified-llvm/testbuild-release/bin/clang-12+0x2c0e9be)
#11 0x00000000024e9b56 llvm::FPPassManager::runOnFunction(llvm::Function&)
(unified-llvm/testbuild-release/bin/clang-12+0x24e9b56)
#12 0x00000000024ef623 llvm::FPPassManager::runOnModule(llvm::Module&)
(unified-llvm/testbuild-release/bin/clang-12+0x24ef623)
#13 0x00000000024ea18f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(unified-llvm/testbuild-release/bin/clang-12+0x24ea18f)
#14 0x0000000002ca2690 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(unified-llvm/testbuild-release/bin/clang-12+0x2ca2690)
#15 0x0000000003460278
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(unified-llvm/testbuild-release/bin/clang-12+0x3460278)
#16 0x00000000042f2e73 clang::ParseAST(clang::Sema&, bool, bool)
(unified-llvm/testbuild-release/bin/clang-12+0x42f2e73)
#17 0x00000000033b813b clang::FrontendAction::Execute()
(unified-llvm/testbuild-release/bin/clang-12+0x33b813b)
#18 0x0000000003311631
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(unified-llvm/testbuild-release/bin/clang-12+0x3311631)
#19 0x000000000345ae4a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(unified-llvm/testbuild-release/bin/clang-12+0x345ae4a)
#20 0x000000000182ee9d cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (unified-llvm/testbuild-release/bin/clang-12+0x182ee9d)
#21 0x000000000182d201 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(unified-llvm/testbuild-release/bin/clang-12+0x182d201)
#22 0x00000000031ced42 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)
(unified-llvm/testbuild-release/bin/clang-12+0x31ced42)
#23 0x0000000002a48bf7
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(unified-llvm/testbuild-release/bin/clang-12+0x2a48bf7)
#24 0x00000000031ce4a9
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
(unified-llvm/testbuild-release/bin/clang-12+0x31ce4a9)
#25 0x0000000003197474
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(unified-llvm/testbuild-release/bin/clang-12+0x3197474)
#26 0x0000000003197927
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(unified-llvm/testbuild-release/bin/clang-12+0x3197927)
#27 0x00000000031b0078
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(unified-llvm/testbuild-release/bin/clang-12+0x31b0078)
#28 0x000000000182cb3d main
(unified-llvm/testbuild-release/bin/clang-12+0x182cb3d)
#29 0x00007fc8ee561cca __libc_start_main ./csu/../csu/libc-start.c:308:16
#30 0x000000000182a02a _start
(unified-llvm/testbuild-release/bin/clang-12+0x182a02a)
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 12.0.0 (unified-llvm/llvm-project/.git
a8e50f1c6e7b404aab8fedb972f003a4d6a6434e)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: unified-llvm/testbuild-release/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/cfg80211-ad10bb.c
clang-12: note: diagnostic msg: /tmp/cfg80211-ad10bb.sh
clang-12: note: diagnostic msg:
********************
The preprocessed source is too large to attach here, even when compressed. I'm
working on reducing it and will post a test case when I have it.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201110/a3beacfc/attachment-0001.html>
More information about the llvm-bugs
mailing list