<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 - Assertion `Header.MCDwarfFiles.empty()' failed in GDB tests after r340839"
   href="https://bugs.llvm.org/show_bug.cgi?id=38994">38994</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `Header.MCDwarfFiles.empty()' failed in GDB tests after r340839
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>douglas_yung@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>After r340839 was committed, two tests in the GDB 7.8 test suite started to hit
an assertion failure. The tests that are hitting an assertion failure are
gdb.dwarf2/member-ptr-forwardref.S and gdb.mi/mi-reg-undefined.S.

The sources for these tests can be found at
<a href="https://github.com/HSAFoundation/HSA-Debugger-GDB-Source-AMD/tree/master/gdb-7.8/gdb/testsuite">https://github.com/HSAFoundation/HSA-Debugger-GDB-Source-AMD/tree/master/gdb-7.8/gdb/testsuite</a>,
but I will also attach the tests to this bug for ease of reference.

To reproduce the assertion failure, simply build either test case with -g using
a compiler built from r340839 or later.

Here is a sample stack trace from trying to compile mi-reg-undefined.S:

clang-8: /home/dyung/src/upstream/llvm_clean/include/llvm/MC/MCDwarf.h:316:
void
llvm::MCDwarfLineTable::resetRootFile(): Assertion
`Header.MCDwarfFiles.empty()' failed.
Stack dump:
0.    Program arguments: /home/dyung/src/upstream/340839-linux/bin/clang-8
-cc1as -triple
x86_64-unknown-linux-gnu -filetype obj -main-file-name mi-reg-undefined.S
-target-cpu x86-64
-fdebug-compilation-dir /home/dyung/sandbox/gdb -dwarf-debug-producer clang
version 8.0.0 (trunk
340839) -debug-info-kind=limited -dwarf-version=4 -mrelocation-model static -o
mi-reg-undefined
/tmp/mi-reg-undefined-d76113.s 
#0 0x00000000020e3b34 PrintStackTraceSignalHandler(void*)
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x20e3b34)
#1 0x00000000020e19de llvm::sys::RunSignalHandlers()
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x20e19de)
#2 0x00000000020e3cf2 SignalHandler(int)
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x20e3cf2)
#3 0x00007fef75bcd330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007fef749c5c37 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x36c37)
#5 0x00007fef749c9028 abort (/lib/x86_64-linux-gnu/libc.so.6+0x3a028)
#6 0x00007fef749bebf6 (/lib/x86_64-linux-gnu/libc.so.6+0x2fbf6)
#7 0x00007fef749beca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000001e25795 (anonymous
namespace)::AsmParser::parseStatement((anonymous
namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*)
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x1e25795)
#9 0x0000000001e1611c (anonymous namespace)::AsmParser::Run(bool, bool)
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x1e1611c)
#10 0x00000000008fb797 cc1as_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x8fb797)
#11 0x00000000008f473a main
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x8f473a)
#12 0x00007fef749b0f45 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21f45)
#13 0x00000000008f166d _start
(/home/dyung/src/upstream/340839-linux/bin/clang-8+0x8f166d)
clang-8: error: unable to execute command: Aborted (core dumped)
clang-8: error: clang integrated assembler command failed due to signal (use -v
to see invocation)
clang version 8.0.0 (trunk 340839)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/dyung/src/upstream/340839-linux/bin</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>