<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - segfault when compiling MPICH 3.1.4"
   href="https://llvm.org/bugs/show_bug.cgi?id=24455">24455</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>segfault when compiling MPICH 3.1.4
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>opensource@torbjoern-klatt.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14722" name="attach_14722" title="mpich configure and make log and preprocessed sources and run script">attachment 14722</a> <a href="attachment.cgi?id=14722&action=edit" title="mpich configure and make log and preprocessed sources and run script">[details]</a></span>
mpich configure and make log and preprocessed sources and run script

I've tried compiling the current MPICH release (3.1.4) with Clang 3.6.1. This
led to a segfault of Clang frontend.

Please see attached configure.log, make.log, preprocessed sources and run
script.

Here is the stacktrace and segfault message:

  CC       src/mpi/pt2pt/lib_libmpi_la-greq_start.lo
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpi/pt2pt/greq_start.c:239:62: error:
alias must point to a defined variable or function
        MPIX_Grequest_class *greq_class)
__attribute__((weak,alias("MPIX_Grequest_class_create")));
                                                             ^
#0 0x14aecf2 llvm::sys::PrintStackTrace(_IO_FILE*)
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x14aecf2)
#1 0x14ace11 SignalHandler(int)
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x14ace11)
#2 0x7f833cb11890 __restore_rt (/lib64/libpthread.so.0+0xf890)
#3 0x18a65b0 clang::CodeGen::CodeGenModule::checkAliases()
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x18a65b0)
#4 0x18ab5c9 clang::CodeGen::CodeGenModule::Release()
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x18ab5c9)
#5 0x18417ae clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x18417ae)
#6 0x1bf1d63 clang::ParseAST(clang::Sema&, bool, bool)
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x1bf1d63)
#7 0x161d176 clang::FrontendAction::Execute()
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x161d176)
#8 0x15fdf28 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x15fdf28)
#9 0x168ceb1 clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x168ceb1)
#10 0x842400 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x842400)
#11 0x81f00a main (/data/opt/toolchains/clang/3.6.1/bin/clang-3.6+0x81f00a)
#12 0x7f833bd46b05 __libc_start_main
/usr/src/debug/glibc-2.19/csu/libc-start.c:319:0
#13 0x8406b9 _start
/home/abuild/rpmbuild/BUILD/glibc-2.19/csu/../sysdeps/x86_64/start.S:125:0
Stack dump:
0.      Program arguments: /data/opt/toolchains/clang/3.6.1/bin/clang-3.6 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-main-file-name greq_start.c -mrelocation-model pic -pic-level 2 -mthread-model
posix -fmath-errno -masm-verbose
 -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -g -dwarf-column-info -coverage-file
/opt/toolchains/clang/3.6.1/build/mpi/mpich/3.1.4/src/mpi/pt2pt/.libs/lib_libmpi_la-greq_start.o
-resource-dir /data/opt/toolchains/c
lang/3.6.1/bin/../lib/clang/3.6.1 -dependency-file
src/mpi/pt2pt/.deps/lib_libmpi_la-greq_start.Tpo -sys-header-deps -MP -MT
src/mpi/pt2pt/lib_libmpi_la-greq_start.lo -D HAVE_CONFIG_H -D _REENTRANT -D
NDEBUG -D NVALGRIND -D PIC -I . -I /opt/toolchains/src/mpi/mpich/3.1.4
 -I ./src/include -I /opt/toolchains/src/mpi/mpich/3.1.4/src/include -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpi/datatype -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpi/spawn -I src/util/logging/common -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/util/wrappers -I ./src/
util/wrappers -I ./src/binding/cxx -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpid/ch3/include -I
./src/mpid/ch3/include -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpid/ch3/channels/nemesis/include -I
./src/mpid/ch3/channels/nemesis/include -I /opt/toolchains/src/mpi/mpi
ch/3.1.4/src/mpid/ch3/channels/nemesis/utils/monitor -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpid/common/datatype -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpid/common/datatype -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpid/common/sched -I
/opt/toolchains/src/mpi/mp
ich/3.1.4/src/mpid/common/thread -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/pmi/simple -I
/opt/toolchains/clang/3.6.1/build/mpi/mpich/3.1.4/src/mpl/include -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpl/include -I
/opt/toolchains/src/mpi/mpich/3.1.4/src/openpa/src -I /op
t/toolchains/clang/3.6.1/build/mpi/mpich/3.1.4/src/openpa/src -I
/opt/toolchains/clang/3.6.1/build/mpi/mpich/3.1.4/src/mpi/romio/include
-internal-isystem /usr/local/include -internal-isystem
/data/opt/toolchains/clang/3.6.1/bin/../lib/clang/3.6.1/include -internal-exter
nc-isystem /include -internal-externc-isystem /usr/include -O2
-fdebug-compilation-dir /opt/toolchains/clang/3.6.1/build/mpi/mpich/3.1.4
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o src
/mpi/pt2pt/.libs/lib_libmpi_la-greq_start.o -x c
/opt/toolchains/src/mpi/mpich/3.1.4/src/mpi/pt2pt/greq_start.c 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
clang-3.6: error: unable to execute command: Segmentation fault
clang-3.6: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.1 (tags/RELEASE_361/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.6: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.6: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.6: note: diagnostic msg: /tmp/greq_start-b67efd.c
clang-3.6: note: diagnostic msg: /tmp/greq_start-b67efd.sh
clang-3.6: note: diagnostic msg: 

********************



Clang was built with GCC [1] using CMake with build type 'Release' and without
LLVM examples.


[1]: from openSUSE 13.2 repositories, i.e. $gcc --version --> gcc (SUSE Linux)
gcc 4.8.3 20140627 [gcc-4_8-branch revision 212064]</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>