<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Deadlock on ctrl-c"
   href="http://llvm.org/bugs/show_bug.cgi?id=22272">22272</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Deadlock on ctrl-c
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>Support Libraries
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rafael.espindola@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I noticed that llvm-tblgen sometimes deadlocks if it gets a SIGINT. This time I
managed to get a backtrace. The problem is that we try to allocate memory from
a signal handler:

#0  0x00007fc20c6952ac in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x00007fc20c60a8bc in malloc () from /lib64/libc.so.6
#2  0x00007fc20cec2608 in operator new(unsigned long) () from
/lib64/libstdc++.so.6
#3  0x00007fc20d37e134 in void*
llvm::object_creator<llvm::sys::SmartMutex<true> >() () from
/home/espindola/llvm/build/bin/../lib/libLLVMSupport.so
#4  0x00007fc20d378725 in llvm::ManagedStaticBase::RegisterManagedStatic(void*
(*)(), void (*)(void*)) const () from
/home/espindola/llvm/build/bin/../lib/libLLVMSupport.so
#5  0x00007fc20d37dd4a in llvm::ManagedStatic<llvm::sys::SmartMutex<true>
<span class="quote">>::operator*() () from /home/espindola/llvm/build/bin/../lib/libLLVMSupport.so</span >
#6  0x00007fc20d3ec5bc in SignalHandler(int) () from
/home/espindola/llvm/build/bin/../lib/libLLVMSupport.so
#7  <signal handler called>
#8  0x00007fc20c60b180 in free () from /lib64/libc.so.6
#9  0x00007fc20d1cdef0 in llvm::SmallVectorImpl<unsigned
int>::~SmallVectorImpl() () from
/home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#10 0x00007fc20d1cde85 in llvm::SmallVector<unsigned int, 32u>::~SmallVector()
() from /home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#11 0x00007fc20d1a7f15 in llvm::FoldingSetNodeID::~FoldingSetNodeID() () from
/home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#12 0x00007fc20d1a57bf in llvm::BitsInit::get(llvm::ArrayRef<llvm::Init*>) ()
from /home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#13 0x00007fc20d1a8668 in llvm::BitsInit::resolveReferences(llvm::Record&,
llvm::RecordVal const*) const () from
/home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#14 0x00007fc20d1b0fcf in llvm::Record::resolveReferencesTo(llvm::RecordVal
const*) () from /home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#15 0x00007fc20d1ecb60 in
llvm::TGParser::ResolveMulticlassDefArgs(llvm::MultiClass&, llvm::Record*,
llvm::SMLoc, llvm::SMLoc, std::vector<llvm::Init*, std::allocator<llvm::Init*>
<span class="quote">> const&, std::vector<llvm::Init*, std::allocator<llvm::Init*> >&, bool) ()</span >
from /home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#16 0x00007fc20d1ed4f6 in llvm::TGParser::ParseDefm(llvm::MultiClass*) () from
/home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#17 0x00007fc20d1eabe2 in llvm::TGParser::ParseObject(llvm::MultiClass*) ()
from /home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#18 0x00007fc20d1eac92 in llvm::TGParser::ParseObjectList(llvm::MultiClass*) ()
from /home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#19 0x00007fc20d1edba9 in llvm::TGParser::ParseFile() () from
/home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#20 0x00007fc20d19c9f0 in llvm::TableGenMain(char*, bool
(*)(llvm::raw_ostream&, llvm::RecordKeeper&)) () from
/home/espindola/llvm/build/bin/../lib/libLLVMTableGen.so
#21 0x00000000005ef8fe in main ()</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>