[llvm-bugs] [Bug 51203] New: clang -O0 compile crash: IRTranslator.cpp:344 on aarch64 platform
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jul 24 02:21:14 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51203
Bug ID: 51203
Summary: clang -O0 compile crash: IRTranslator.cpp:344 on
aarch64 platform
Product: clang
Version: 12.0
Hardware: Other
OS: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: yansendao at huawei.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Created attachment 25062
--> https://bugs.llvm.org/attachment.cgi?id=25062&action=edit
creduce testcase file
on linux aarch64 machine compile crash:
$ ~/software/llvm12/bin/clang test-creduce.c -c
test-creduce.c:2:5: warning: tentative array definition assumed to have one
element
int b[];
^
clang:
/home/yansendao/opensource/llvm12/llvm-project/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:344:
bool llvm::IRTranslator::translateCompare(const llvm::User&,
llvm::MachineIRBuilder&): Assertion `CI && "Instruction should be CmpInst"'
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: /home/yansendao/software/llvm12/bin/clang
test-creduce.c -c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'test-creduce.c'.
4. Running pass 'IRTranslator' on function '@d'
#0 0x0000000002b9c8ec llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/yansendao/software/llvm12/bin/clang+0x2b9c8ec)
#1 0x0000000002b9ac50 llvm::sys::RunSignalHandlers()
(/home/yansendao/software/llvm12/bin/clang+0x2b9ac50)
#2 0x0000000002b10d04 CrashRecoverySignalHandler(int)
(/home/yansendao/software/llvm12/bin/clang+0x2b10d04)
#3 0x0000ffffbea68688 (linux-vdso.so.1+0x688)
#4 0x0000ffffbe5b54f8 raise
/build/glibc-D9JkfM/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
clang-12: error: clang frontend command failed with exit code 134 (use -v to
see invocation)
clang version 12.0.1
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/yansendao/software/llvm12/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/test-creduce-44ad96.c
clang-12: note: diagnostic msg: /tmp/test-creduce-44ad96.sh
clang-12: note: diagnostic msg:
********************
$ lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 96
On-line CPU(s) list: 0-95
Thread(s) per core: 1
Core(s) per socket: 48
Socket(s): 2
NUMA node(s): 4
Vendor ID: 0x48
Model: 0
Stepping: 0x1
BogoMIPS: 200.00
L1d cache: 64K
L1i cache: 64K
L2 cache: 512K
L3 cache: 49152K
NUMA node0 CPU(s): 0-23
NUMA node1 CPU(s): 24-47
NUMA node2 CPU(s): 48-71
NUMA node3 CPU(s): 72-95
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp
asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
on linux x86-64 machile compile normally:
yansendao at CloudCompiler-145:boole-issue2451$ clang test-creduce.c -c
test-creduce.c:2:5: warning: tentative array definition assumed to have one
element
int b[];
^
1 warning generated.
yansendao at CloudCompiler-145:boole-issue2451$ clang -v
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64
$ cat test-creduce.c
int a;
int b[];
void(c)();
void d() {
for (; 0;)
c(0x5Cp+1 > (&a == &b[6]));
}
int main() {}
--
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/20210724/b0204e9e/attachment-0001.html>
More information about the llvm-bugs
mailing list