<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">A good way to start is to let Clang generate a crash reproducer, then you have a single file on which to run delta or creduce on. Once you have a reduced testcase, we can try and help you figure out what is triggering the assertion.<div class=""><br class=""></div><div class="">-- adrian<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 12, 2020, at 9:02 AM, Tomar, Sourabh Singh <<a href="mailto:SourabhSingh.Tomar@amd.com" class="">SourabhSingh.Tomar@amd.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi folks,<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">While building openmpi.4.0.0(Optimized debug build), using trunk clang we encountered a crash(assertion failure).<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Initially assertion seems trivial:<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[…]<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">void llvm::DwarfExpression::addFragmentOffset(const llvm::DIExpression*): Assertion `FragmentOffset >= OffsetInBits && "overlapping or duplicate fragments"' failed.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[…]<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">But, narrowing to RC. We discovered “-O3 -enable-partial-inlining” pass which is doing some DebugInfo manipulation, later triggering this.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Reproducibility:<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">$ wget<span class="Apple-converted-space"> </span><a href="https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.0.tar.bz2" style="color: rgb(5, 99, 193); text-decoration: underline;" class="">https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.0.tar.bz2</a><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">$ tar -xf openmpi-4.0.0<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">$ cd openmpi-4.0.0<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">$ ./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<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">$ make -jN<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">----CRASH----<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Details of Narrowing:<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">$ cd ompi/mca/vprotocol/pessimist<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">$ 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<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">--CRASH—<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Note: Entire application and above file compiling fine if we remove “—enable-partial-inlining”.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’ll be filing a BUG, as soon as someone from community confirms this.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks You,<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Sourabh.</div></div></div></blockquote></div><br class=""></div></body></html>