<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 - Segfault in llvm::MachineRegisterInfo::addRegOperandToUseList"
   href="https://bugs.llvm.org/show_bug.cgi?id=48211">48211</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Segfault in llvm::MachineRegisterInfo::addRegOperandToUseList
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>tmandry@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24178" name="attach_24178" title="Reproducer">attachment 24178</a> <a href="attachment.cgi?id=24178&action=edit" title="Reproducer">[details]</a></span>
Reproducer

This is a real crash hit with rustc. The segfault still occurs with assertions
enabled, unless I messed up the incremental build somehow.

<span class="quote">> ~/frust/build/x86_64-unknown-linux-gnu/llvm/bin/llc -O0 bugpoint-reduced-simplified.bc</span >
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments:
/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/llc
-O0 bugpoint-reduced-simplified.bc 
1.      Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.bc'.
2.      Running pass 'IRTranslator' on function
'@_ZN3std3sys4unix2fs5lstat17h30bd1f0595542181E'
 #0 0x00007f2ce766c47c PrintStackTraceSignalHandler(void*)
(.llvm.14272527432730108163)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x133747c)
 #1 0x00007f2ce7669c3e llvm::sys::RunSignalHandlers()
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1334c3e)
 #2 0x00007f2ce766c905 SignalHandler(int)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1337905)
 #3 0x00007f2ce630c140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #4 0x00007f2ce7aac790
llvm::MachineRegisterInfo::addRegOperandToUseList(llvm::MachineOperand*)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1777790)
 #5 0x00007f2ce804d14a
llvm::MachineIRBuilder::buildDirectDbgValue(llvm::Register, llvm::MDNode
const*, llvm::MDNode const*)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1d1814a)
 #6 0x00007f2ce8001da2
llvm::IRTranslator::translateKnownIntrinsic(llvm::CallInst const&, unsigned
int, llvm::MachineIRBuilder&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1cccda2)
 #7 0x00007f2ce8003045 llvm::IRTranslator::translateCall(llvm::User const&,
llvm::MachineIRBuilder&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1cce045)
 #8 0x00007f2ce8006aaa llvm::IRTranslator::translate(llvm::Instruction const&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1cd1aaa)
 #9 0x00007f2ce8008e2b
llvm::IRTranslator::runOnMachineFunction(llvm::MachineFunction&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x1cd3e2b)
#10 0x00007f2ce7a2bfee
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x16f6fee)
#11 0x00007f2ce77d1721 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x149c721)
#12 0x00007f2ce77d9803 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x14a4803)
#13 0x00007f2ce77d218d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/../lib/libLLVM-11-rust-1.49.0-nightly.so+0x149d18d)
#14 0x000000000020ae2e main
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/llc+0x20ae2e)
#15 0x00007f2ce6015cca __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x26cca)
#16 0x0000000000208129 _start
(/usr/local/google/home/tmandry/frust/build/x86_64-unknown-linux-gnu/llvm/bin/llc+0x208129)

<span class="quote">> ~/frust/build/x86_64-unknown-linux-gnu/llvm/bin/llc -version</span >
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
  LLVM version 11.0.0-rust-1.49.0-nightly
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake-avx512

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    avr        - Atmel AVR Microcontroller
    wasm32     - WebAssembly 32-bit
    wasm64     - WebAssembly 64-bit
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64</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>