llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.38k stars 12.14k forks source link

Trouble compiling scidb source code #34980

Open llvmbot opened 6 years ago

llvmbot commented 6 years ago
Bugzilla Link 35632
Version 5.0
OS Linux
Attachments scid clang diagnostic
Reporter LLVM Bugzilla Contributor
CC @DougGregor

Extended Description

Scidb is a chess program written in C++11. I tried to compile the latest revision (r1453) from https://svn.code.sf.net/p/scidb/code/trunk

Clang segfaults during compilation (please see attached files).

Clang version is: $ clang --version clang version 5.0.1-svn319952-1~exp1 (branches/release_50)

Operating system is Ubuntu 16.04. I am using the official xenial update channel for llvm.

Since I can't attach individual files I've attached a zip file.

Build log:

​9 0x00007fef8ece868f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x8c868f)

​10 0x000000000083bc55 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 >) (/usr/lib/llvm-5.0/bin/clang+0x83bc55)

​11 0x0000000000d055c0 (/usr/lib/llvm-5.0/bin/clang+0xd055c0)

​12 0x0000000000e28f18 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-5.0/bin/clang+0xe28f18)

​13 0x0000000000d04d47 clang::CodeGenAction::ExecuteAction() (/usr/lib/llvm-5.0/bin/clang+0xd04d47)

​14 0x0000000000ba1a1e clang::FrontendAction::Execute() (/usr/lib/llvm-5.0/bin/clang+0xba1a1e)

​15 0x0000000000b6ea16 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-5.0/bin/clang+0xb6ea16)

​16 0x0000000000c28652 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-5.0/bin/clang+0xc28652)

​17 0x00000000007fb428 cc1_main(llvm::ArrayRef<char const>, char const, void*) (/usr/lib/llvm-5.0/bin/clang+0x7fb428)

​18 0x00000000007e9577 main (/usr/lib/llvm-5.0/bin/clang+0x7e9577)

​19 0x00007fef8d570830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0

​20 0x00000000007f92e9 _start (/usr/lib/llvm-5.0/bin/clang+0x7f92e9)

Stack dump:

  1. Program arguments: /usr/lib/llvm-5.0/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name db_bpgn_reader.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-feature -sse2 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/bogdb/projects/scidb-code/src/db/db_bpgn_reader.gcno -resource-dir /usr/lib/llvm-5.0/lib/clang/5.0.1 -I /usr/include/tcl8.6 -D SCI_NAMEBASE_FIX=1 -D BROKEN_LINKER_HACK=1 -D DONT_USE_GDB -D DONT_USE_FRAME_ADDR -I . -I cql -I sci -I sci/v91 -I sci/v92 -I sci/v93 -I si3 -I cbh -I cbf -I ../mstl -I ../util -I ../util/libTeXt -I ../util/libharu -I ../util/universalchardet -I ../util/expat -I ../sys -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward -internal-isystem /usr/include/clang/5.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-5.0/lib/clang/5.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -Wno-mismatched-tags -Wno-gnu -Wno-invalid-source-encoding -Wno-format-security -std=c++0x -fdeprecated-macro -fdebug-compilation-dir /home/bogdb/projects/scidb-code/src/db -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o db_bpgn_reader.o -x c++ db_bpgn_reader.cpp
  2. parser at end of file
  3. Code generation
  4. Running pass 'Function Pass Manager' on module 'db_bpgn_reader.cpp'.
  5. Running pass 'X86 FP Stackifier' on function '@_ZN2db10BpgnReader21estimateNumberOfGamesEj' clang: error: unable to execute command: Segmentation fault (core dumped) clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 5.0.1-svn319952-1~exp1 (branches/release_50) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin clang: 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: note: diagnostic msg:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/db_bpgn_reader-1ee9c4.cpp clang: note: diagnostic msg: /tmp/db_bpgn_reader-1ee9c4.sh clang: note: diagnostic msg:


Makefile:161: recipe for target 'db_bpgn_reader.o' failed make[2]: [db_bpgn_reader.o] Error 254 Makefile:205: recipe for target 'recursive' failed make[1]: [recursive] Error 1 Makefile:18: recipe for target 'all' failed make: *** [all] Error 2

Hope this helps.

Best regards, Bogdan

llvmbot commented 6 years ago

Sorry forgot to mention I am using the WSL (ubuntu 16.04) in windows 10. The previous revision of scidb (r1452) compiles fine with clang, but the latest one causes clang to segfault.

Endilll commented 1 year ago

Still crashing as of post-17 trunk: https://godbolt.org/z/9jz5TThhq Reduced by C-Reduce:

double ceil() { ceil(); }
llvmbot commented 1 year ago

@llvm/issue-subscribers-backend-x86