[LLVMdev] Running pass 'Greedy Register Allocator' leads to Segmentation fault (core dumped)

S├ębastien Boisvert seb at boisvert.info
Sat Nov 17 05:34:43 PST 2012


Hi,

I want to use LLVM 3.1 (with clang for the frontend) for compiling Open-MPI 1.6.3,
which is a message-passing library. But I get a segmentation fault by the "Greedy
Register Allocator".

There is the bug # 11756 that solves a similar problem, but the bugzilla says "Version 3.0",
and I am using 3.1 so it is likely a different bug that I am dealing with.

    http://llvm.org/bugs/show_bug.cgi?id=11756

I believe the bug I am reporting is already reported in bug # 11969 when building
FreeBSD world:

    http://llvm.org/bugs/show_bug.cgi?id=11969


---
To reproduce the problem:

Program I am compiling:

   http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.3.tar.bz2


Version of LLVM/Clang: 3.1

How I compiled LLVM:

# \see llvm.org/docs/Packaging.html

../llvm-3.1.src/configure \
--prefix=/software/compilers/llvm/3.1 \
--disable-assertions \
--enable-debug-symbols \
--enable-optimized \
--enable-shared \

make -j 4

make install


Command generated by the Makefile:

$ /software/compilers/llvm/3.1/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-file-name filem_rsh_module.c -pic-level 2 -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50.0.6 -momit-leaf-frame-pointer -coverage-file .libs/filem_rsh_module.o -resource-dir /software/compilers/llvm/3.1/bin/../lib/clang/3.1 -dependency-file .deps/filem_rsh_module.Tpo -sys-header-deps -MP -MT filem_rsh_module.lo -D HAVE_CONFIG_H -D NDEBUG -D PIC -I . -I ../../../../../openmpi-1.6.3/orte/mca/filem/rsh -I ../../../../opal/include -I ../../../../orte/include -I ../../../../ompi/include -I ../../../../opal/mca/hwloc/hwloc132/hwloc/include/private/autogen -I ../../../../opal/mca/hwloc/hwloc132/hwloc/include/hwloc/autogen -I ../../../../../openmpi-1.6.3 -I ../../../.. -I ../../../../../openmpi-1.6.3/opal/include -I ../../../../../openmpi-1.6.3/orte/include -I ../../../../../openmpi!
 -1.6.3/om
i/include -I /clumeq/src/Open-MPI/1.6.3/openmpi-1.6.3/opal/mca/hwloc/hwloc132/hwloc/include -I /clumeq/src/Open-MPI/1.6.3/openmpi-llvm/opal/mca/hwloc/hwloc132/hwloc/include -I /usr/include/infiniband -I /usr/include/infiniband -fmodule-cache-path /var/tmp/clang-module-cache -c-isystem /software/compilers/llvm/3.1/include -internal-isystem /usr/local/include -internal-isystem /software/compilers/llvm/3.1/bin/../lib/clang/3.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -std=gnu89 -fdebug-compilation-dir /clumeq/src/Open-MPI/1.6.3/openmpi-llvm/orte/mca/filem/rsh -ferror-limit 19 -fmessage-length 0 -pthread -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -o .libs/filem_rsh_module.o -x c ../../../../../openmpi-1.6.3/orte/mca/filem/rsh/filem_rsh_module.c
0  libLLVM-3.1.so  0x00002b989f3e80df
1  libLLVM-3.1.so  0x00002b989f3e8827
2  libpthread.so.0 0x000000328280ebe0
3  libLLVM-3.1.so  0x00002b989ec09c36 llvm::ConnectedVNInfoEqClasses::Distribute(llvm::LiveInterval**, llvm::MachineRegisterInfo&) + 342
4  libLLVM-3.1.so  0x00002b989ec1af75 llvm::LiveRangeEdit::eliminateDeadDefs(llvm::SmallVectorImpl<llvm::MachineInstr*>&, llvm::ArrayRef<unsigned int>) + 949
5  libLLVM-3.1.so  0x00002b989ebf2142
6  libLLVM-3.1.so  0x00002b989ebf297c
7  libLLVM-3.1.so  0x00002b989ecacb67
8  libLLVM-3.1.so  0x00002b989ec9ed65 llvm::RegAllocBase::allocatePhysRegs() + 181
9  libLLVM-3.1.so  0x00002b989ecad4ce
10 libLLVM-3.1.so  0x00002b989ec4eb10 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 96
11 libLLVM-3.1.so  0x00002b989ede6731 llvm::FPPassManager::runOnFunction(llvm::Function&) + 561
12 libLLVM-3.1.so  0x00002b989ede678d llvm::FPPassManager::runOnModule(llvm::Module&) + 45
13 libLLVM-3.1.so  0x00002b989ede7b04 llvm::MPPassManager::runOnModule(llvm::Module&) + 516
14 libLLVM-3.1.so  0x00002b989ede7be2 llvm::PassManagerImpl::run(llvm::Module&) + 114
15 libLLVM-3.1.so  0x00002b989ede7c7d llvm::PassManager::run(llvm::Module&) + 13
16 clang           0x00000000006a0aab clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 1387
17 clang           0x000000000069e2ca
18 clang           0x000000000081d189 clang::ParseAST(clang::Sema&, bool, bool) + 489
19 clang           0x000000000069c513 clang::CodeGenAction::ExecuteAction() + 51
20 clang           0x000000000053530b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 267
21 clang           0x000000000051b0c9 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1209
22 clang           0x0000000000512e58 cc1_main(char const**, char const**, char const*, void*) + 1416
23 clang           0x000000000051a3df main + 4975
24 libc.so.6       0x0000003281c1d994 __libc_start_main + 244
25 clang           0x00000000005107b9
Stack dump:
0.      Program arguments: /software/compilers/llvm/3.1/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-file-name filem_rsh_module.c -pic-level 2 -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50.0.6 -momit-leaf-frame-pointer -coverage-file .libs/filem_rsh_module.o -resource-dir /software/compilers/llvm/3.1/bin/../lib/clang/3.1 -dependency-file .deps/filem_rsh_module.Tpo -sys-header-deps -MP -MT filem_rsh_module.lo -D HAVE_CONFIG_H -D NDEBUG -D PIC -I . -I ../../../../../openmpi-1.6.3/orte/mca/filem/rsh -I ../../../../opal/include -I ../../../../orte/include -I ../../../../ompi/include -I ../../../../opal/mca/hwloc/hwloc132/hwloc/include/private/autogen -I ../../../../opal/mca/hwloc/hwloc132/hwloc/include/hwloc/autogen -I ../../../../../openmpi-1.6.3 -I ../../../.. -I ../../../../../openmpi-1.6.3/opal/include -I ../../../../../openmpi-1.6.3/orte/include !
 -I ../../
./../../openmpi-1.6.3/ompi/include -I /clumeq/src/Open-MPI/1.6.3/openmpi-1.6.3/opal/mca/hwloc/hwloc132/hwloc/include -I /clumeq/src/Open-MPI/1.6.3/openmpi-llvm/opal/mca/hwloc/hwloc132/hwloc/include -I /usr/include/infiniband -I /usr/include/infiniband -fmodule-cache-path /var/tmp/clang-module-cache -c-isystem /software/compilers/llvm/3.1/include -internal-isystem /usr/local/include -internal-isystem /software/compilers/llvm/3.1/bin/../lib/clang/3.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -std=gnu89 -fdebug-compilation-dir /clumeq/src/Open-MPI/1.6.3/openmpi-llvm/orte/mca/filem/rsh -ferror-limit 19 -fmessage-length 0 -pthread -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -o .libs/filem_rsh_module.o -x c ../../../../../openmpi-1.6.3/orte/mca/filem/rsh/filem_rsh_module.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '../../../../../openmpi-1.6.3/orte/mca/filem/rsh/filem_rsh_module.c'.
4.      Running pass 'Greedy Register Allocator' on function '@orte_filem_rsh_start_copy'
Segmentation fault (core dumped)







More information about the llvm-dev mailing list