[llvm-bugs] [Bug 33149] New: crash at -O3 in only 32-bit mode on x86_64-linux-gnu (Assertion `Sequence.size() - Noops == ScheduledNodes && "The number of nodes scheduled doesn't match the expected number!"' failed.)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 23 16:04:20 PDT 2017


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

            Bug ID: 33149
           Summary: crash at -O3 in only 32-bit mode on x86_64-linux-gnu
                    (Assertion `Sequence.size() - Noops == ScheduledNodes
                    && "The number of nodes scheduled doesn't match the
                    expected number!"' failed.)
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            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 303641) (llvm/trunk 303640)
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 -m32 -O3 small.c
clang-5.0:
/tmp/llvm-builder/llvm-source-trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:696:
void llvm::ScheduleDAGSDNodes::VerifyScheduledSequence(bool): Assertion
`Sequence.size() - Noops == ScheduledNodes && "The number of nodes scheduled
doesn't match the expected number!"' failed.
#0 0x00000000020862ba llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-5.0+0x20862ba)
#1 0x00000000020842ce llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-5.0+0x20842ce)
#2 0x0000000002084432 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-5.0+0x2084432)
#3 0x00007f6ca7f0f330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f6ca6cfdc37 gsignal
/build/eglibc-MjiXCM/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f6ca6d01028 abort
/build/eglibc-MjiXCM/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f6ca6cf6bf6 __assert_fail_base
/build/eglibc-MjiXCM/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f6ca6cf6ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000002864993 (/usr/local/clang-trunk/bin/clang-5.0+0x2864993)
#9 0x0000000002863497 (anonymous namespace)::ScheduleDAGRRList::Schedule()
(/usr/local/clang-trunk/bin/clang-5.0+0x2863497)
#10 0x00000000027ee3f3 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/usr/local/clang-trunk/bin/clang-5.0+0x27ee3f3)
#11 0x00000000027eef56
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, true>, bool&)
(/usr/local/clang-trunk/bin/clang-5.0+0x27eef56)
#12 0x00000000027f6cd1
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/usr/local/clang-trunk/bin/clang-5.0+0x27f6cd1)
#13 0x00000000027f8ef7
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone
.part.1009] (/usr/local/clang-trunk/bin/clang-5.0+0x27f8ef7)
#14 0x00000000015975b4 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/usr/local/clang-trunk/bin/clang-5.0+0x15975b4)
#15 0x000000000197f945
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-5.0+0x197f945)
#16 0x0000000001c55243 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1c55243)
#17 0x0000000001c552ec llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1c552ec)
#18 0x0000000001c5604f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1c5604f)
#19 0x000000000220c3de (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+0x220c3de)
#20 0x000000000220d751 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+0x220d751)
#21 0x00000000028b0c9b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/clang-trunk/bin/clang-5.0+0x28b0c9b)
#22 0x0000000002c952c2 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-5.0+0x2c952c2)
#23 0x00000000028b036f clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-5.0+0x28b036f)
#24 0x0000000002584446 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-5.0+0x2584446)
#25 0x000000000255e0b6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-5.0+0x255e0b6)
#26 0x000000000260f2f4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-5.0+0x260f2f4)
#27 0x0000000000c121c8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-5.0+0xc121c8)
#28 0x0000000000bb17eb main (/usr/local/clang-trunk/bin/clang-5.0+0xbb17eb)
#29 0x00007f6ca6ce8f45 __libc_start_main
/build/eglibc-MjiXCM/eglibc-2.19/csu/libc-start.c:321:0
#30 0x0000000000c0dad9 _start (/usr/local/clang-trunk/bin/clang-5.0+0xc0dad9)
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/bin/clang-5.0 -cc1 -triple
i386-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu pentium4
-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/ -internal-isystem /usr/local/include
-internal-isystem /usr/local/clang-trunk/lib/clang/5.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdebug-compilation-dir
/home/cnsun/ramdisk/hermes/run-4/res/20170523-clang-trunk-m32-Weverything-g-O3-build-112859/delta
-ferror-limit 19 -fmessage-length 139 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o /tmp/small-8e688b.o -x c small.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'small.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
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 303641) (llvm/trunk 303640)
Target: i386-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-1fedc4.c
clang-5.0: note: diagnostic msg: /tmp/small-1fedc4.sh
clang-5.0: note: diagnostic msg: 

********************
$ cat small.c
char a, g;
struct {
  int f0;
  unsigned f1;
  int f2;
} b, e;
int c;
short d, f;
char fn1(p1) { return p1 + a; }

int main() {
  char h;
  int i = d = 4;
  for (; d; d--) {
    f = fn1(b.f2 && (i = 9));
    h = g = e.f0 == 0 || h % e.f0;
    e = b;
    c = i;
  }
  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/20170523/6532aaa4/attachment-0001.html>


More information about the llvm-bugs mailing list