<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 - Symbolizer should ignore undefined symbols"
   href="https://bugs.llvm.org/show_bug.cgi?id=40591">40591</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Symbolizer should ignore undefined symbols
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>llvm-symbolizer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jh7370.2008@my.bristol.ac.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>llvm-symbolizer currently treats undefined symbols as symbols at address 0 and
so if 0 is specified as an input address, it will find that symbol, even if
there is a defined symbol at that location. I wrote a lit test to reproduce
this issue:

# symbolize-undef-syms.s
# REQUIRES: x86-registered-target

# RUN: llvm-mc --filetype=obj --triple=x86_64-pc-linux %s -o %t.o -g
# RUN: llvm-symbolizer --obj=%t.o 0 | FileCheck %s --implicit-check-not=bar

# CHECK:      foo
# CHECK-NEXT: symbolize-undef-syms.s:14:0

.type bar,@function
.type foo,@function
.global foo
foo:
    call bar

This test will fail because bar was picked instead of foo. It would be good to
never pick bar, even if there is no defined symbol, since bar cannot represent
that 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>