[llvm-bugs] [Bug 28933] New: crash at -O1 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (Assertion `MSSA->locallyDominates(D, U)' failed)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 10 21:55:12 PDT 2016


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

            Bug ID: 28933
           Summary: crash at -O1 and above in both 32-bit and 64-bit modes
                    on x86_64-linux-gnu (Assertion
                    `MSSA->locallyDominates(D, U)' failed)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chengniansun at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

$ clang-trunk -v
clang version 4.0.0 (trunk 278233)
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 -O1 small.c
clang-4.0:
/tmp/llvm-builder/llvm-source-trunk/lib/Transforms/Scalar/GVNHoist.cpp:472:
bool {anonymous}::GVNHoist::safeToHoistLdSt(const llvm::Instruction*, const
llvm::Instruction*, llvm::MemoryUseOrDef*, {anonymous}::GVNHoist::InsKind,
int&): Assertion `MSSA->locallyDominates(D, U)' failed.
#0 0x0000000001c22da5 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-4.0+0x1c22da5)
#1 0x0000000001c20d0e llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-4.0+0x1c20d0e)
#2 0x0000000001c20e72 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-4.0+0x1c20e72)
#3 0x00007f0e2e50c330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f0e2d2fdc37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f0e2d301028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f0e2d2f6bf6 __assert_fail_base
/build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f0e2d2f6ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000001ac8624 (anonymous
namespace)::GVNHoist::computeInsertionPoints(llvm::DenseMap<std::pair<unsigned
int, unsigned int>, llvm::SmallVector<llvm::Instruction*, 4u>,
llvm::DenseMapInfo<std::pair<unsigned int, unsigned int> >,
llvm::detail::DenseMapPair<std::pair<unsigned int, unsigned int>,
llvm::SmallVector<llvm::Instruction*, 4u> > > const&,
llvm::SmallVector<std::pair<llvm::BasicBlock*,
llvm::SmallVector<llvm::Instruction*, 4u> >, 4u>&, (anonymous
namespace)::GVNHoist::InsKind) [clone .constprop.428]
(/usr/local/clang-trunk/bin/clang-4.0+0x1ac8624)
#9 0x0000000001ac8edf (anonymous namespace)::GVNHoist::run(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-4.0+0x1ac8edf)
#10 0x0000000001aca4f0 (anonymous
namespace)::GVNHoistLegacyPass::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-4.0+0x1aca4f0)
#11 0x00000000018a5763 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-4.0+0x18a5763)
#12 0x00000000018a5897
llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-4.0+0x18a5897)
#13 0x00000000018a5964 llvm::legacy::FunctionPassManager::run(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-4.0+0x18a5964)
#14 0x0000000001d7be40 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
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-4.0+0x1d7be40)
#15 0x00000000023716e8
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/clang-trunk/bin/clang-4.0+0x23716e8)
#16 0x00000000026c419b clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-4.0+0x26c419b)
#17 0x0000000002371ade clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-4.0+0x2371ade)
#18 0x000000000208ee46 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-4.0+0x208ee46)
#19 0x0000000002069e4e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-4.0+0x2069e4e)
#20 0x0000000002114946
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-4.0+0x2114946)
#21 0x0000000000a52ee8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-4.0+0xa52ee8)
#22 0x00000000009fdbcf main (/usr/local/clang-trunk/bin/clang-4.0+0x9fdbcf)
#23 0x00007f0e2d2e8f45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#24 0x0000000000a4ed9d _start (/usr/local/clang-trunk/bin/clang-4.0+0xa4ed9d)
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/bin/clang-4.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/bin/../lib/clang/4.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/bin/../lib/clang/4.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O1 -w -fdebug-compilation-dir
/home/cnsun/ramdisk/hermes/run-3/res/20160809-clang-trunk-m64-g-O3-build-210537/delta
-ferror-limit 19 -fmessage-length 238 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/small-260f31.o -x c
small.c
1.      <eof> parser at end of file
2.      Per-function optimization
3.      Running pass 'Early GVN Hoisting of Expressions' on function '@main'
clang-4.0: error: unable to execute command: Aborted (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 278233)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-4.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-4.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-4.0: note: diagnostic msg: /tmp/small-406c28.c
clang-4.0: note: diagnostic msg: /tmp/small-406c28.sh
clang-4.0: note: diagnostic msg:

********************
$
$ cat small.c
int a, b, c;
int main () {
  a = 0 != &b;
  a = c || 4;
  a |= c >= 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/20160811/b44bb5b0/attachment.html>


More information about the llvm-bugs mailing list