[llvm-bugs] [Bug 45568] New: Crash in pass "Simple Register Coalescing" when building Linux kernel's powerpc allyesconfig
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 15 22:57:42 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45568
Bug ID: 45568
Summary: Crash in pass "Simple Register Coalescing" when
building Linux kernel's powerpc allyesconfig
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: natechancellor at gmail.com
CC: llvm-bugs at lists.llvm.org, nemanja.i.ibm at gmail.com
When building the 'allyesconfig' target for the Linux kernel with ARCH=powerpc,
I see the following crash:
Stack dump:
0. Program arguments: /home/nathan/src/tc-build/install/bin/clang-11 -cc1
-triple powerpc64-unknown-linux-gnu -S -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name cavium.c -mrelocation-model static
-mthread-model posix -fno-delete-null-pointer-checks -mllvm
-warn-stack-size=2048 -mframe-pointer=all -relaxed-aliasing -fmath-errno
-fno-rounding-math -no-integrated-as -mconstructor-aliases -mcmodel=medium
-target-cpu
pwr5 -target-feature -altivec -target-feature -vsx -target-feature -spe
-target-feature -hard-float -msoft-float -mfloat-abi soft -target-abi elfv1
-dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb
-ffunction-sections -fdata-sections -nostdsysteminc -nobuiltininc -resource-dir
/home/nathan/src/tc-build/install/lib/clang/11.0.0 -dependency-file
drivers/mmc/host/.cavium.o.d -MT drivers/mmc/host/.tmp_cavium.o
-sys-header-deps -isystem
/home/nathan/src/tc-build/install/lib/clang/11.0.0/include -include
/home/nathan/src/linux-stable/include/linux/kconfig.h -include
/home/nathan/src/linux-stable/include/linux/compiler_types.h -I
/home/nathan/src/linux-stable/arch/powerpc/include -I
./arch/powerpc/include/generated -I /home/nathan/src/linux-stable/include -I
./include -I /home/nathan/src/linux-stable/arch/powerpc/include/uapi -I
./arch/powerpc/include/generated/uapi -I
/home/nathan/src/linux-stable/include/uapi -I ./include/generated/uapi -I
/home/nathan/src/linux-stable/drivers/mmc/host -I drivers/mmc/host -D
__KERNEL__ -I /home/nathan/src/linux-stable/arch/powerpc -D HAVE_AS_ATHIGH=1 -I
/home/nathan/src/linux-stable/arch/powerpc -D KBUILD_BASENAME="cavium" -D
KBUILD_MODNAME="thunderx_mmc"
-fmacro-prefix-map=/home/nathan/src/linux-stable/= -O2 -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration
-Wno-format-security -Werror=unknown-warning-option -Wno-frame-address
-Wno-int-in-bool-context -Wno-address-of-packed-member
-Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare
-Wno-unused-const-variable -Wdeclaration-after-statement -Wno-pointer-sign
-Werror=implicit-int -Werror=strict-prototypes -Werror=date-time
-Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value
-Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized
-Wno-pointer-to-enum-cast -std=gnu89 -fno-dwarf-directory-asm
-fdebug-compilation-dir /home/nathan/src/linux-stable/out/ppc64 -ferror-limit
19 -pg -fwrapv -fno-signed-char -fwchar-type=short -fno-signed-wchar
-fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -o
/tmp/cavium-394fad.s -x c
/home/nathan/src/linux-stable/drivers/mmc/host/cavium.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module
'/home/nathan/src/linux-stable/drivers/mmc/host/cavium.c'.
4. Running pass 'Simple Register Coalescing' on function
'@cvm_mmc_request'
#0 0x00000000018c0d14 PrintStackTraceSignalHandler(void*)
(/home/nathan/src/tc-build/install/bin/clang-11+0x18c0d14)
#1 0x00000000018beaae llvm::sys::RunSignalHandlers()
(/home/nathan/src/tc-build/install/bin/clang-11+0x18beaae)
#2 0x00000000018c100c SignalHandler(int)
(/home/nathan/src/tc-build/install/bin/clang-11+0x18c100c)
#3 0x00007f2a7039b890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x000000000112b375 (anonymous
namespace)::JoinVals::computeAssignment(unsigned int, (anonymous
namespace)::JoinVals&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x112b375)
#5 0x00000000011222bd (anonymous
namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x11222bd)
#6 0x000000000111d186 (anonymous
namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x111d186)
#7 0x000000000106a8d4
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x106a8d4)
#8 0x00000000013892f3 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x13892f3)
#9 0x0000000001389603 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x1389603)
#10 0x0000000001389b8f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x1389b8f)
#11 0x0000000001a5b176 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> >)
(/home/nathan/src/tc-build/install/bin/clang-11+0x1a5b176)
#12 0x000000000219f5cf
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x219f5cf)
#13 0x000000000278a563 clang::ParseAST(clang::Sema&, bool, bool)
(/home/nathan/src/tc-build/install/bin/clang-11+0x278a563)
#14 0x0000000002110725 clang::FrontendAction::Execute()
(/home/nathan/src/tc-build/install/bin/clang-11+0x2110725)
#15 0x000000000207252b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/nathan/src/tc-build/install/bin/clang-11+0x207252b)
#16 0x000000000219a4cf
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/nathan/src/tc-build/install/bin/clang-11+0x219a4cf)
#17 0x0000000000a8adaa cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/nathan/src/tc-build/install/bin/clang-11+0xa8adaa)
#18 0x0000000000a8937b ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/nathan/src/tc-build/install/bin/clang-11+0xa8937b)
#19 0x0000000000a88e60 main
(/home/nathan/src/tc-build/install/bin/clang-11+0xa88e60)
#20 0x00007f2a6f051b97 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#21 0x0000000000a8602a _start
(/home/nathan/src/tc-build/install/bin/clang-11+0xa8602a)
clang-11: error: unable to execute command: Segmentation fault
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
ClangBuiltLinux clang version 11.0.0 (git://github.com/llvm/llvm-project
7aaaea5acd09c4a437bca93874eae13d880d51fd)
Target: powerpc64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/nathan/src/tc-build/install/bin
clang-11: note: diagnostic msg:
********************
creduce spits out:
struct {
int arg
} * f;
struct b {
int c;
int d
};
static e[] = {0, 0};
g, h, i;
j() {
struct b *a;
int k;
a = e + g;
k = a->c;
if (f)
k = f->arg ?: 2;
i = k;
h = a->d;
}
when built with just 'clang -O2 --target=powerpc64-linux-gnu -c -o /dev/null
cavium.i'.
I have uploaded the raw preprocessed source here:
https://gist.github.com/3c2fe356d383dac766c7f3f30a04472e
--
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/20200416/b0a8dab3/attachment-0001.html>
More information about the llvm-bugs
mailing list