<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Unable to resolve pending breakpoint to an indirect (STT_GNU_IFUNC) function"
   href="https://bugs.llvm.org/show_bug.cgi?id=36394">36394</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unable to resolve pending breakpoint to an indirect (STT_GNU_IFUNC) function
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </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>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dantipov@nvidia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19868" name="attach_19868" title="Test program">attachment 19868</a> <a href="attachment.cgi?id=19868&action=edit" title="Test program">[details]</a></span>
Test program

While trying to setup a pending breakpoint for sin() and cos() which are
dlsym()ed from libm.so, an attempt to continue execution seems just hangs the
debugger:

(lldb) attach 17043
Process 17043 stopped
* thread #1, name = 't-dlopen', stop reason = signal SIGSTOP
    frame #0: 0x0000000000400728 t-dlopen`main(argc=1, argv=0x00007ffd2b0a00c8)
at t-dlopen.c:21
   18        for (a = 0; a < DELAY + argc; a++)
   19          for (b = 0; b < DELAY + argc; b++)
   20            for (c = 0; c < DELAY + argc; c++)
-> 21              z += a + b + c;
   22        while (1)
   23          {
   24            void *handle = dlopen (LIBM_SO, RTLD_LAZY);

Executable module set to "/home/dantipov/tmp/t-dlopen".
Architecture set to: x86_64--linux.
(lldb) breakpoint set -n sin
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set -n cos
Breakpoint 2: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) process continue                              ;; After this, nothing
happens for a long time
Process 17043 resuming
(lldb) process status                                ;; After this, lldb hangs
and have to be killed

Note that sin() and cos() are not the regular functions but an indirect
function stubs, see <a href="https://sourceware.org/glibc/wiki/GNU_IFUNC">https://sourceware.org/glibc/wiki/GNU_IFUNC</a>.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>