<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 --- - [ARM] Libc++abi built in-tree with libunwind fails in __cxa_allocate_exception" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24273&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=ighhC3jVxgQbkkmlzgVOvAUqxhujpUNHths7hjPR-RE&s=D7RUdUDonbbZ3IYtkGO7m6rgEMoDvv-haaboOCG1pKY&e=">24273</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[ARM] Libc++abi built in-tree with libunwind fails in __cxa_allocate_exception
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++abi
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>renato.golin@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While building LLVM+Clang+RT+libc++ all in one go, some tests fail on ARM with
a recursive call to __cxa_end_cleanup.

I have used CMake with -DLIBCXXABI_USE_LLVM_UNWINDER=True
-DCMAKE_CXX_FLAGS=-std=c++11

The command line is:
clang++ -g -O0 -o
/home/linaro/devel/llvm/build/llvm/projects/libcxxabi/test/Output/unwind_05.pass.cpp.o
-x c++ /home/linaro/devel/llvm/src/libcxxabi/test/unwind_05.pass.cpp -c -v
-DLIBCXXABI_NO_TIMER -std=c++11 -nostdinc++
-I/home/linaro/devel/llvm/src/llvm/projects/libcxx/include
-I/home/linaro/devel/llvm/src/llvm/projects/libcxxabi/include
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS

then:
clang++ -o
/home/linaro/devel/llvm/build/llvm/projects/libcxxabi/test/Output/unwind_05.pass.cpp.exe
/home/linaro/devel/llvm/build/llvm/projects/libcxxabi/test/Output/unwind_05.pass.cpp.o
-nodefaultlibs -L/home/linaro/devel/llvm/build/llvm/lib
-Wl,-rpath,/home/linaro/devel/llvm/build/llvm/lib -lc++ -lc++abi -lc -lm
-lpthread -lrt -lunwind -ldl

Here's a back-trace:
Program received signal SIGABRT, Aborted.
__libc_do_syscall () at
../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
44    ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or
directory.
(gdb) bt
#0  __libc_do_syscall () at
../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
#1  0xb6e71f0e in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb6e74766 in __GI_abort () at abort.c:89
#3  0xb6daacec in unwind_phase2(unw_context_t*, _Unwind_Control_Block*, bool)
() from /home/linaro/devel/llvm/build/llvm/lib/libunwind.so.1
#4  0xb6dab11c in _Unwind_Resume () from
/home/linaro/devel/llvm/build/llvm/lib/libunwind.so.1
#5  0xb6f509c0 in __cxa_end_cleanup () from
/home/linaro/devel/llvm/build/llvm/lib/libc++abi.so.1
#6  0xb6f509c0 in __cxa_end_cleanup () from
/home/linaro/devel/llvm/build/llvm/lib/libc++abi.so.1
...
#200 0xb6f509c0 in __cxa_end_cleanup () from
/home/linaro/devel/llvm/build/llvm/lib/libc++abi.so.1
...

(gdb) f 3
(gdb) disas
    0xb6daace4 <+532>:    bl    0xb6daaa7c
<_ZL10assert_rtnPKcS0_iS0_.constprop.3>
   0xb6daace8 <+536>:    blx    0xb6da908c
=> 0xb6daacec <+540>:    ldr    r0, [pc, #204]    ; (0xb6daadbc
<_ZL13unwind_phase2P13unw_context_tP21_Unwind_Control_Blockb+748>)

(gdb) disas 0xb6da908c 
No function contains specified address.</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>