[llvm-dev] [DebugInfo]Crash during building openmpi4.0.0
Tomar, Sourabh Singh via llvm-dev
llvm-dev at lists.llvm.org
Thu Nov 12 09:02:23 PST 2020
Hi folks,
While building openmpi.4.0.0(Optimized debug build), using trunk clang we encountered a crash(assertion failure).
Initially assertion seems trivial:
[...]
void llvm::DwarfExpression::addFragmentOffset(const llvm::DIExpression*): Assertion `FragmentOffset >= OffsetInBits && "overlapping or duplicate fragments"' failed.
[...]
But, narrowing to RC. We discovered "-O3 -enable-partial-inlining" pass which is doing some DebugInfo manipulation, later triggering this.
Reproducibility:
$ wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.0.tar.bz2
$ tar -xf openmpi-4.0.0
$ cd openmpi-4.0.0
$ ./configure --enable-mpi-fortran=no OMPI_CC=/home/sourabh/mirror-upstream/build/release/bin/clang OMPI_CXX=clang++ CXX=clang++ CC=clang CFLAGS="="-g -O3 -mllvm -enable-partial-inlining " CXXFLAGS="-g -O3 -mllvm -enable-partial-inlining" AR=llvm-ar RANLIB=llvm-ranlib NM=llvm-nm
$ make -jN
----CRASH----
Details of Narrowing:
$ cd ompi/mca/vprotocol/pessimist
$ clang -DHAVE_CONFIG_H -I. -I../../../../opal/include -I../../../../ompi/include -I../../../../oshmem/include -I../../../../opal/mca/hwloc/hwloc201/hwloc/include/private/autogen -I../../../../opal/mca/hwloc/hwloc201/hwloc/include/hwloc/autogen -I../../../../ompi/mpiext/cuda/c -I../../../.. -I../../../../orte/include -I/home/regressions/openmpi-4.0.0/opal/mca/event/libevent2022/libevent -I/home/regressions/openmpi-4.0.0/opal/mca/event/libevent2022/libevent/include -I/home/regressions/openmpi-4.0.0/opal/mca/hwloc/hwloc201/hwloc/include -DNDEBUG -g -O3 -mllvm -enable-partial-inlining -finline-functions -fno-strict-aliasing -mcx16 -pthread -MT vprotocol_pessimist_recv.lo -MD -MP -MF .deps/vprotocol_pessimist_recv.Tpo -c vprotocol_pessimist_recv.c -S
--CRASH-
Note: Entire application and above file compiling fine if we remove "-enable-partial-inlining".
I attempted to come-up with a more reduced case but that was in vain. This pass "-partial-inliner" is disabled by default(even at O3) and not much of content or sample test cases as to what this transformation actually do.
I'll be filing a BUG, as soon as someone from community confirms this.
Thanks You,
Sourabh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201112/19b39b65/attachment.html>
More information about the llvm-dev
mailing list