[llvm-bugs] [Bug 51903] New: clang crash at "RegAllocFast.cpp:960"
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 18 08:04:56 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51903
Bug ID: 51903
Summary: clang crash at "RegAllocFast.cpp:960"
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: suochenyao at 163.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
int a;
char *d;
unsigned e() {return 1;}
#pragma pack(1)
struct {
unsigned b : 11;
signed : 25;
} c;
void f() {
for (; 0;) {
long g = (*d = (g |= a) == e() >= 64170087900) ^ c.b;
}
}
int main() { return 0; }
*******************************************************************************
clang version:
$ clang -v
clang version 14.0.0 (/data/src/llvm-dev/llvm-project/clang
8919e7b251f319e5cb36a72e64362fb80b230cac)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /data/bin/llvm-dev/bin
Found candidate GCC installation:
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Selected GCC installation:
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 10.2
*******************************************************************************
Command Lines:
$ clang a.c
clang-14:
/data/src/llvm-dev/llvm-project/llvm/lib/CodeGen/RegAllocFast.cpp:960: void
{anonymous}::RegAllocFast::useVirtReg(llvm::MachineInstr&, unsigned int, llvm::
Register): Assertion `(!MO.isKill() || LRI->LastUse == &MI) && "Invalid kill
flag"' 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: /data/bin/llvm-dev/bin/clang-14 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -main-file-
name a.c -mrelocation-model static -mframe-pointer=all -fmath-errno
-fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64
-tune-cpu generic -debugger-tuning=gdb
-fcoverage-compilation-dir=/data/code/dev-test/RECO/llvm/test_dir/925-59
-resource-dir /data/bin/llvm-dev/lib/clang/14.0.0 -internal-isystem
/data$bin/llvm-dev/lib/clang/14.0.0/include -internal-isystem
/usr/local/include -internal-isystem
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../..$x86_64-redhat-linux/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir=/data/code/dev-test/RECO/llvm/test_dir$925-59
-ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/a-a790d9.o -x c a.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'a.c'.
4. Running pass 'Fast Register Allocator' on function '@f'
#0 0x0000000002fe13ef PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x0000000002fdee89 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f87a135c630 __restore_rt sigaction.c:0:0
#3 0x00007f879ff493d7 raise (/lib64/libc.so.6+0x363d7)
#4 0x00007f879ff4aac8 abort (/lib64/libc.so.6+0x37ac8)
#5 0x00007f879ff421a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
#6 0x00007f879ff42252 (/lib64/libc.so.6+0x2f252)
#7 0x000000000244bcb5 (anonymous
namespace)::RegAllocFast::allocateInstruction(llvm::MachineInstr&)
RegAllocFast.cpp:0:0
#8 0x000000000244c295 (anonymous
namespace)::RegAllocFast::allocateBasicBlock(llvm::MachineBasicBlock&)
RegAllocFast.cpp:0:0
#9 0x000000000244df0d (anonymous
namespace)::RegAllocFast::runOnMachineFunction(llvm::MachineFunction&)
RegAllocFast.cpp:0:0
#10 0x0000000002300286
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.35)
MachineFunctionPass.cpp:0:0
#11 0x0000000002786ce6 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/data/bin/llvm-dev/bin/clang-14+0x2786ce6)
#12 0x0000000002787019 llvm::FPPassManager::runOnModule(llvm::Module&)
(/data/bin/llvm-dev/bin/clang-14+0x2787019)
#13 0x0000000002787dd0 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/data/bin/llvm-dev/bin/clang-14+0x2787dd0)
#14 0x00000000032ccfd9 (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std:$default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
#15 0x00000000032d078d clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions con$t&, clang::LangOptions const&, llvm::StringRef,
llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_s$ream> >)
(/data/bin/llvm-dev/bin/clang-14+0x32d078d)
#16 0x0000000003f7a526
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/data/bin/llvm-dev/bin/clang-14+0x3f7a526)
#17 0x0000000004a99b19 clang::ParseAST(clang::Sema&, bool, bool)
(/data/bin/llvm-dev/bin/clang-14+0x4a99b19)
#18 0x0000000003f793b0 clang::CodeGenAction::ExecuteAction()
(/data/bin/llvm-dev/bin/clang-14+0x3f793b0)
#19 0x00000000038dc549 clang::FrontendAction::Execute()
(/data/bin/llvm-dev/bin/clang-14+0x38dc549)
#20 0x000000000387f78a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/data/bin/llvm-dev/bin/clang-14+0x387f78a)
#21 0x00000000039a5b8a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/data/bin/llvm-dev/bin/clang-14+0x39a5b8a)
#22 0x0000000000b44d0c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/data/bin/llvm-dev/bin/clang-14+0xb44d0c)
#23 0x0000000000b3f671 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#24 0x0000000000a74721 main (/data/bin/llvm-dev/bin/clang-14+0xa74721)
#25 0x00007f879ff35555 __libc_start_main (/lib64/libc.so.6+0x22555)
#26 0x0000000000b3eff5 _start (/data/bin/llvm-dev/bin/clang-14+0xb3eff5)
clang-14: error: unable to execute command: Aborted (core dumped)
clang-14: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 14.0.0 (/data/src/llvm-dev/llvm-project/clang
8919e7b251f319e5cb36a72e64362fb80b230cac)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /data/bin/llvm-dev/bin
clang-14: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-14: note: diagnostic msg: /tmp/a-4b0668.c
clang-14: note: diagnostic msg: /tmp/a-4b0668.sh
clang-14: note: diagnostic msg:
********************
--
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/20210918/20af96dc/attachment.html>
More information about the llvm-bugs
mailing list