[llvm-bugs] [Bug 32245] New: crash at -O2 and -O3 in both 32-bit and 64-bit on x86_64-linux-gnu (DominatorTree is not up to date!)
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Mar 11 20:46:40 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=32245
Bug ID: 32245
Summary: crash at -O2 and -O3 in both 32-bit and 64-bit on
x86_64-linux-gnu (DominatorTree is not up to date!)
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: chengniansun at gmail.com
CC: llvm-bugs at lists.llvm.org
$ clang-trunk -v
clang version 5.0.0 (trunk 297562)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
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.2
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.3.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clang-trunk -w small.c -O3
DominatorTree is not up to date!
Computed:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 19 slow queries.
[1] %entry {0,15}
[2] %for.cond.outer.peel.begin {4294967295,4294967295}
[3] %for.cond.outer.peel {4294967295,4294967295}
[4] %if.then.i.split.peel {4294967295,4294967295}
[5] %for.condthread-pre-split.i.peel {4294967295,4294967295}
[5] %while.condthread-pre-split.i.peel {4294967295,4294967295}
[5] %while.cond.i.peel {4294967295,4294967295}
[6] %while.body.i.peel {4294967295,4294967295}
[6] %for.cond.outer.peel.next {4294967295,4294967295}
[7] %for.cond.outer.peel.next4 {4294967295,4294967295}
[8] %entry.peel.newph {4294967295,4294967295}
[9] %for.cond.outer {1,14}
[10] %if.then.i.split {2,11}
[11] %for.condthread-pre-split.i {3,4}
[11] %while.condthread-pre-split.i {5,6}
[11] %while.cond.i {7,10}
[12] %while.body.i {8,9}
[10] %for.cond.preheader.loopexit {4294967295,4294967295}
[6] %for.cond.preheader {4294967295,4294967295}
[7] %for.cond {12,13}
Actual:
=============================--------------------------------
Inorder Dominator Tree:
[1] %entry {0,35}
[2] %for.cond.outer.peel.begin {1,34}
[3] %for.cond.outer.peel {2,33}
[4] %if.then.i.split.peel {3,28}
[5] %for.condthread-pre-split.i.peel {4,7}
[6] %while.condthread-pre-split.i.peel {5,6}
[5] %while.cond.i.peel {8,27}
[6] %for.cond.outer.peel.next {9,26}
[7] %for.cond.outer.peel.next4 {10,25}
[8] %entry.peel.newph {11,24}
[9] %for.cond.outer {12,23}
[10] %if.then.i.split {13,20}
[11] %for.condthread-pre-split.i {14,17}
[12] %while.condthread-pre-split.i {15,16}
[11] %while.cond.i {18,19}
[10] %for.cond.preheader.loopexit {21,22}
[4] %for.cond.preheader {29,32}
[5] %for.cond {30,31}
#0 0x0000000001efdfca llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1efdfca)
#1 0x0000000001efbfde llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-5.0+0x1efbfde)
#2 0x0000000001efc142 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-5.0+0x1efc142)
#3 0x00007ff743b25330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007ff742916c37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007ff74291a028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#6 0x0000000001aa68ad llvm::DominatorTree::verifyDomTree() const
(/usr/local/clang-trunk/bin/clang-5.0+0x1aa68ad)
#7 0x0000000001f6936d llvm::UnrollLoop(llvm::Loop*, unsigned int, unsigned int,
bool, bool, bool, bool, bool, unsigned int, unsigned int, llvm::LoopInfo*,
llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::AssumptionCache*,
llvm::OptimizationRemarkEmitter*, bool)
(/usr/local/clang-trunk/bin/clang-5.0+0x1f6936d)
#8 0x0000000001dea160 tryToUnrollLoop(llvm::Loop*, llvm::DominatorTree&,
llvm::LoopInfo*, llvm::ScalarEvolution*, llvm::TargetTransformInfo const&,
llvm::AssumptionCache&, llvm::OptimizationRemarkEmitter&, bool, int,
llvm::Optional<unsigned int>, llvm::Optional<unsigned int>,
llvm::Optional<bool>, llvm::Optional<bool>, llvm::Optional<bool>)
(/usr/local/clang-trunk/bin/clang-5.0+0x1dea160)
#9 0x0000000001dea8ba (anonymous namespace)::LoopUnroll::runOnLoop(llvm::Loop*,
llvm::LPPassManager&) (/usr/local/clang-trunk/bin/clang-5.0+0x1dea8ba)
#10 0x0000000001688287 llvm::LPPassManager::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1688287)
#11 0x0000000001ae6873 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1ae6873)
#12 0x000000000287451f (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-5.0+0x287451f)
#13 0x0000000001ae75af llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1ae75af)
#14 0x000000000208e36a (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/clang-trunk/bin/clang-5.0+0x208e36a)
#15 0x000000000208f653 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> >)
(/usr/local/clang-trunk/bin/clang-5.0+0x208f653)
#16 0x00000000027121ec
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/clang-trunk/bin/clang-5.0+0x27121ec)
#17 0x0000000002ad9522 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-5.0+0x2ad9522)
#18 0x0000000002710b8a clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-5.0+0x2710b8a)
#19 0x00000000023f0a26 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-5.0+0x23f0a26)
#20 0x00000000023cb056
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-5.0+0x23cb056)
#21 0x000000000247c384
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-5.0+0x247c384)
#22 0x0000000000b247b8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-5.0+0xb247b8)
#23 0x0000000000ac5a11 main (/usr/local/clang-trunk/bin/clang-5.0+0xac5a11)
#24 0x00007ff742901f45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#25 0x0000000000b20079 _start (/usr/local/clang-trunk/bin/clang-5.0+0xb20079)
Stack dump:
0. Program arguments: /usr/local/clang-trunk/bin/clang-5.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
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -resource-dir
/usr/local/clang-trunk/lib/clang/5.0.0 -c-isystem . -c-isystem
/usr/local/include/csmith-2.2.0/ -c-isystem /usr/local/include/csmith-2.2.0/
-internal-isystem /usr/local/include -internal-isystem
/usr/local/clang-trunk/lib/clang/5.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O3 -w -fdebug-compilation-dir
/home/cnsun/ramdisk/hermes/run-3/res/20170307-clang-trunk-m32-Weverything-g-O3-build-060623/delta
-ferror-limit 19 -fmessage-length 132 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o /tmp/small-3ec7dc.o -x c small.c
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 'Loop Pass Manager' on function '@main'
5. Running pass 'Unroll loops' on basic block '%for.cond.outer'
clang-5.0: error: unable to execute command: Aborted (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 (trunk 297562)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-5.0: 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-5.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/small-d4f848.c
clang-5.0: note: diagnostic msg: /tmp/small-d4f848.sh
clang-5.0: note: diagnostic msg:
********************
$ cat small.c
int a, b, c;
void fn1() {
if (a <= 3) {
if (a < 0)
for (b; b; b++)
;
while (a == 1)
c--;
a = 0;
}
}
int main() {
for (;;)
fn1();
}
--
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/20170312/8a5c10dd/attachment-0001.html>
More information about the llvm-bugs
mailing list