[llvm-bugs] [Bug 34416] New: crash with '-O3 -mllvm -polly" on x86_64-linux-gnu (Segmentation fault. polly::canSynthesize)

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 1 12:23:07 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34416

            Bug ID: 34416
           Summary: crash with '-O3 -mllvm -polly" on x86_64-linux-gnu
                    (Segmentation fault. polly::canSynthesize)
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          Reporter: chengniansun at gmail.com
                CC: llvm-bugs at lists.llvm.org

$ clang-trunk -v
clang version 6.0.0 (trunk 312246)
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.4
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 -O3 -mllvm -polly small.c
#0 0x0000000002125c3a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-6.0+0x2125c3a)
#1 0x0000000002123cee llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-6.0+0x2123cee)
#2 0x0000000002123e52 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-6.0+0x2123e52)
#3 0x00007f7c73cc3330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x0000000002789d11 polly::canSynthesize(llvm::Value const*, polly::Scop
const&, llvm::ScalarEvolution*, llvm::Loop*)
(/usr/local/clang-trunk/bin/clang-6.0+0x2789d11)
#5 0x000000000279302a polly::VirtualUse::create(polly::Scop*, polly::ScopStmt*,
llvm::Loop*, llvm::Value*, bool)
(/usr/local/clang-trunk/bin/clang-6.0+0x279302a)
#6 0x0000000002796894 polly::markReachable(polly::Scop*, llvm::LoopInfo*,
llvm::DenseSet<polly::VirtualInstruction,
llvm::DenseMapInfo<polly::VirtualInstruction> >&,
llvm::DenseSet<polly::MemoryAccess*, llvm::DenseMapInfo<polly::MemoryAccess*>
>&, polly::ScopStmt*) (/usr/local/clang-trunk/bin/clang-6.0+0x2796894)
#7 0x000000000270acc3 (anonymous
namespace)::Simplify::markAndSweep(llvm::LoopInfo*)
(/usr/local/clang-trunk/bin/clang-6.0+0x270acc3)
#8 0x000000000270e4de (anonymous namespace)::Simplify::runOnScop(polly::Scop&)
(/usr/local/clang-trunk/bin/clang-6.0+0x270e4de)
#9 0x000000000186c56d llvm::RGPassManager::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-6.0+0x186c56d)
#10 0x0000000001ce23c3 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-6.0+0x1ce23c3)
#11 0x0000000001ce246c llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-6.0+0x1ce246c)
#12 0x0000000001ce2cff llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-6.0+0x1ce2cff)
#13 0x00000000022b0373 (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-6.0+0x22b0373)
#14 0x00000000022b168f 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-6.0+0x22b168f)
#15 0x0000000002a8805b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/clang-trunk/bin/clang-6.0+0x2a8805b)
#16 0x0000000002ca5892 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-6.0+0x2ca5892)
#17 0x0000000002a876ff clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-6.0+0x2a876ff)
#18 0x0000000002647d06 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-6.0+0x2647d06)
#19 0x000000000261f2de
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-6.0+0x261f2de)
#20 0x00000000026d66db
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-6.0+0x26d66db)
#21 0x0000000000c1f4c8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-6.0+0xc1f4c8)
#22 0x0000000000bacb6f main (/usr/local/clang-trunk/bin/clang-6.0+0xbacb6f)
#23 0x00007f7c72a9cf45 __libc_start_main
/build/eglibc-MjiXCM/eglibc-2.19/csu/libc-start.c:321:0
#24 0x0000000000c1aae9 _start (/usr/local/clang-trunk/bin/clang-6.0+0xc1aae9)
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/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
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -resource-dir
/usr/local/clang-trunk/lib/clang/6.0.0 -c-isystem
/usr/local/include/csmith-2.2.0/ -internal-isystem /usr/local/include
-internal-isystem /usr/local/clang-trunk/lib/clang/6.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdebug-compilation-dir
/home/cnsun/ramdisk/hermes/run-6/res/20170901-clang-trunk-m32-Weverything-g-O3-mllvm-enable-newgvn-mllvm-polly-build-110211/delta
-ferror-limit 19 -fmessage-length 238 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-mllvm -polly -o /tmp/small-3fff10.o -x c small.c
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 'small.c'.
4.      Running pass 'Region Pass Manager' on function '@main'
5.      Running pass 'Polly - Simplify' on basic block '%for.body.lr.ph'
clang-6.0: error: unable to execute command: Segmentation fault (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 (trunk 312246)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-6.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-6.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-6.0: note: diagnostic msg: /tmp/small-b56578.c
clang-6.0: note: diagnostic msg: /tmp/small-b56578.sh
clang-6.0: note: diagnostic msg:

********************
$ cat small.c
char a, d;
int b, f;
short c;
unsigned e;
int main() {
  a = (0 >= c) % e;
  int g;
  for (; d; ++d) {
    g &= b;
    if (g) {
      if (a <= 1)
        break;
      f = 0;
    }
  }
  return 0;
}
$

-- 
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/20170901/a9eca92f/attachment.html>


More information about the llvm-bugs mailing list