<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:superjoe30@gmail.com" title="Andrew Kelley <superjoe30@gmail.com>"> <span class="fn">Andrew Kelley</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - LLVMTargetMachineEmit aborts process instead of reporting error via return value"
   href="https://llvm.org/bugs/show_bug.cgi?id=27809">bug 27809</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>INVALID
           </td>
           <td>---
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Summary</td>
           <td>i386: error: ran out of registers during register allocation
           </td>
           <td>LLVMTargetMachineEmit aborts process instead of reporting error via return value
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - LLVMTargetMachineEmit aborts process instead of reporting error via return value"
   href="https://llvm.org/bugs/show_bug.cgi?id=27809#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - LLVMTargetMachineEmit aborts process instead of reporting error via return value"
   href="https://llvm.org/bugs/show_bug.cgi?id=27809">bug 27809</a>
              from <span class="vcard"><a class="email" href="mailto:superjoe30@gmail.com" title="Andrew Kelley <superjoe30@gmail.com>"> <span class="fn">Andrew Kelley</span></a>
</span></b>
        <pre>Backtrace follows. Note that according to the API of LLVMTargetMachineEmit it
is supposed to return and report errors via one of its parameters. Instead LLVM
is writing its own error messages to stderr and then calling exit.


#0  0x00007ffff3c5adb0 in exit ()
   from /nix/store/yxkk1j7h8kyglippv2df0gcx8yknhirb-glibc-2.23/lib/libc.so.6
#1  0x00007ffff5a2bb74 in llvm::LLVMContext::diagnose(llvm::DiagnosticInfo
const&) ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#2  0x00007ffff5a2bcdd in llvm::LLVMContext::emitError(unsigned int,
llvm::Twine const&) ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#3  0x00007ffff5b8b29b in llvm::MachineInstr::emitError(llvm::StringRef) const
()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#4  0x00007ffff5c12710 in (anonymous
namespace)::RAFast::allocVirtReg(llvm::MachineInstr*, (anonymous
namespace)::RAFast::LiveReg*, unsigned int) [clone .constprop.190] ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#5  0x00007ffff5c13158 in (anonymous
namespace)::RAFast::reloadVirtReg(llvm::MachineInstr*, unsigned int, unsigned
int, unsigned int) [clone .constprop.186] ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#6  0x00007ffff5c13de4 in (anonymous namespace)::RAFast::AllocateBasicBlock()
[clone .constprop.184] ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#7  0x00007ffff5c1607f in (anonymous
namespace)::RAFast::runOnMachineFunction(llvm::MachineFunction&) ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#8  0x00007ffff5a410fa in llvm::FPPassManager::runOnFunction(llvm::Function&)
()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#9  0x00007ffff5a4146b in llvm::FPPassManager::runOnModule(llvm::Module&) ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#10 0x00007ffff5a40ca4 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#11 0x00007ffff6591b37 in LLVMTargetMachineEmit(LLVMOpaqueTargetMachine*,
LLVMOpaqueModule*, llvm::raw_pwrite_stream&, LLVMCodeGenFileType, char**) ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#12 0x00007ffff6591d94 in LLVMTargetMachineEmitToFile ()
   from
/nix/store/np7pjnhj0qp4n87ynik8sbw75gi9gsni-llvm-3.8.0/lib/libLLVM-3.8.so
#13 0x000000000057c5c4 in codegen_link (g=0x1456280, out_file=0x0)
    at /home/andy/dev/zig/src/link.cpp:789
#14 0x00000000005c08fe in main (argc=12, argv=0x7fffffffc0f8) at
/home/andy/dev/zig/src/main.cpp:400</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>