[llvm-bugs] [Bug 38982] New: clang crashes on valid code at -O1 and above on x86_64-linux-gnu while running pass 'Early GVN Hoisting of Expressions'
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 18 04:26:57 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38982
Bug ID: 38982
Summary: clang crashes on valid code at -O1 and above on
x86_64-linux-gnu while running pass 'Early GVN
Hoisting of Expressions'
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: su at cs.ucdavis.edu
CC: llvm-bugs at lists.llvm.org
Tested with trunk revision 342457.
$ clangpolly -v
clang version 8.0.0 (http://llvm.org/git/clang.git
0c965af23bb73e9da25306503ff6f6e92817fa60) (http://llvm.org/git/llvm.git
0a5be7e8d363bebccce1d73696508598c8fa9423)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clangpolly -O0 -c small.c
$
$ clangpolly -O1 -c small.c
Stack dump:
0. Program arguments: /home/su/software/tmp/polly/llvm_build/bin/clang-6.0
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-momit-leaf-frame-pointer -coverage-notes-file /home/su/small.gcno
-resource-dir /home/su/software/tmp/polly/llvm_build/lib/clang/8.0.0
-internal-isystem /usr/local/include -internal-isystem
/home/su/software/tmp/polly/llvm_build/lib/clang/8.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-fdebug-compilation-dir /home/su -ferror-limit 19 -fmessage-length 127
-fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o small.o -x
c small.c -faddrsig
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'small.c'.
4. Running pass 'Early GVN Hoisting of Expressions' on function '@g'
#0 0x000000000245b40a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x245b40a)
#1 0x00000000024597ac llvm::sys::RunSignalHandlers()
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x24597ac)
#2 0x0000000002459917 SignalHandler(int)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x2459917)
#3 0x00007f3fc6b88390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00000000041ac356
llvm::MemorySSAUpdater::getPreviousDefRecursive(llvm::BasicBlock*,
llvm::DenseMap<llvm::BasicBlock*, llvm::TrackingVH<llvm::MemoryAccess>,
llvm::DenseMapInfo<llvm::BasicBlock*>,
llvm::detail::DenseMapPair<llvm::BasicBlock*,
llvm::TrackingVH<llvm::MemoryAccess> > >&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x41ac356)
#5 0x00000000041ac37b
llvm::MemorySSAUpdater::getPreviousDefRecursive(llvm::BasicBlock*,
llvm::DenseMap<llvm::BasicBlock*, llvm::TrackingVH<llvm::MemoryAccess>,
llvm::DenseMapInfo<llvm::BasicBlock*>,
llvm::detail::DenseMapPair<llvm::BasicBlock*,
llvm::TrackingVH<llvm::MemoryAccess> > >&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x41ac37b)
#6 0x00000000041ac37b
llvm::MemorySSAUpdater::getPreviousDefRecursive(llvm::BasicBlock*,
llvm::DenseMap<llvm::BasicBlock*, llvm::TrackingVH<llvm::MemoryAccess>,
llvm::DenseMapInfo<llvm::BasicBlock*>,
llvm::detail::DenseMapPair<llvm::BasicBlock*,
llvm::TrackingVH<llvm::MemoryAccess> > >&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x41ac37b)
...
#254 0x00000000041ac37b
llvm::MemorySSAUpdater::getPreviousDefRecursive(llvm::BasicBlock*,
llvm::DenseMap<llvm::BasicBlock*, llvm::TrackingVH<llvm::MemoryAccess>,
llvm::DenseMapInfo<llvm::BasicBlock*>,
llvm::detail::DenseMapPair<llvm::BasicBlock*,
llvm::TrackingVH<llvm::MemoryAccess> > >&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x41ac37b)
#255 0x00000000041ac37b
llvm::MemorySSAUpdater::getPreviousDefRecursive(llvm::BasicBlock*,
llvm::DenseMap<llvm::BasicBlock*, llvm::TrackingVH<llvm::MemoryAccess>,
llvm::DenseMapInfo<llvm::BasicBlock*>,
llvm::detail::DenseMapPair<llvm::BasicBlock*,
llvm::TrackingVH<llvm::MemoryAccess> > >&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x41ac37b)
clang-6: error: unable to execute command: Segmentation fault (core dumped)
clang-6: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (http://llvm.org/git/clang.git
0c965af23bb73e9da25306503ff6f6e92817fa60) (http://llvm.org/git/llvm.git
0a5be7e8d363bebccce1d73696508598c8fa9423)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
clang-6: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-6: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6: note: diagnostic msg: /tmp/small-6b8ff5.c
clang-6: note: diagnostic msg: /tmp/small-6b8ff5.sh
clang-6: note: diagnostic msg:
********************
$
-------------------------
int a, b, c, d;
void g ()
{
while (1)
{
int f;
if (d)
{
g ();
while (f++)
;
}
c = b || a + c;
b = a;
}
}
--
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/20180918/bd117527/attachment-0001.html>
More information about the llvm-bugs
mailing list