<html>
    <head>
      <base href="https://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 --- - LLVM JIT crashes on Windows when built in debug mode"
   href="https://llvm.org/bugs/show_bug.cgi?id=31055">31055</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM JIT crashes on Windows when built in debug mode
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.9
          </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>release blocker
          </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>bique.alexandre@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,

We found at work, that LLVM JIT engine crashes on Windows 10 when built in
debug mode.

The Windows debug mode sets junks value in memory and LLVM ends with junk
pointers when clearing up its intrusive linked lists.

Here is a stack trace:

     float-engine-slave.exe!llvm::PointerIntPair<class llvm::ValueHandleBase *
*,2,enum llvm::ValueHandleBase::HandleBaseKind,class
llvm::PointerLikeTypeTraits<class llvm::ValueHandleBase * *>,struct
llvm::PointerIntPairInfo<class llvm::ValueHandleBase * *,2,class
llvm::PointerLikeTypeTraits<class llvm::ValueHandleBase * *> >
<span class="quote">>::setPointer(class llvm::ValueHandleBase * *)    C++</span >
     float-engine-slave.exe!llvm::ValueHandleBase::RemoveFromUseList(void)   
C++
<span class="quote">>        float-engine-slave.exe!llvm::ValueHandleBase::~ValueHandleBase() Line 81        C++</span >
    
float-engine-slave.exe!llvm::AssertingVH<llvm::Instruction>::~AssertingVH<llvm::Instruction>()
   C++
     float-engine-slave.exe!llvm::AssertingVH<llvm::Instruction>::`scalar
deleting destructor'(unsigned int)    C++
     float-engine-slave.exe!std::allocator<llvm::AssertingVH<llvm::Instruction>
<span class="quote">>::destroy<llvm::AssertingVH<llvm::Instruction>
>(llvm::AssertingVH<llvm::Instruction> * _Ptr) Line 665    C++</span >
    
float-engine-slave.exe!std::allocator_traits<std::allocator<llvm::AssertingVH<llvm::Instruction>
<span class="quote">> >::destroy<llvm::AssertingVH<llvm::Instruction>
>(std::allocator<llvm::AssertingVH<llvm::Instruction> > & _Al,</span >
llvm::AssertingVH<llvm::Instruction> * _Ptr) Line 783    C++
    
float-engine-slave.exe!std::_Wrap_alloc<std::allocator<llvm::AssertingVH<llvm::Instruction>
<span class="quote">> >::destroy<llvm::AssertingVH<llvm::Instruction>
>(llvm::AssertingVH<llvm::Instruction> * _Ptr) Line 928    C++</span >
    
float-engine-slave.exe!std::_Destroy_range<std::_Wrap_alloc<std::allocator<llvm::AssertingVH<llvm::Instruction>
<span class="quote">> > >(llvm::AssertingVH<llvm::Instruction> * _First,</span >
llvm::AssertingVH<llvm::Instruction> * _Last,
std::_Wrap_alloc<std::allocator<llvm::AssertingVH<llvm::Instruction> > > & _Al,
std::_Nonscalar_ptr_iterator_tag __formal) Line 172    C++
    
float-engine-slave.exe!std::_Destroy_range<std::_Wrap_alloc<std::allocator<llvm::AssertingVH<llvm::Instruction>
<span class="quote">> > >(llvm::AssertingVH<llvm::Instruction> * _First,</span >
llvm::AssertingVH<llvm::Instruction> * _Last,
std::_Wrap_alloc<std::allocator<llvm::AssertingVH<llvm::Instruction> > > & _Al)
Line 187    C++
    
float-engine-slave.exe!std::vector<llvm::AssertingVH<llvm::Instruction>,std::allocator<llvm::AssertingVH<llvm::Instruction>
<span class="quote">> >::_Destroy(llvm::AssertingVH<llvm::Instruction> * _First,</span >
llvm::AssertingVH<llvm::Instruction> * _Last) Line 1601    C++
    
float-engine-slave.exe!std::vector<llvm::AssertingVH<llvm::Instruction>,std::allocator<llvm::AssertingVH<llvm::Instruction>
<span class="quote">> >::_Tidy() Line 1660    C++</span >
    
float-engine-slave.exe!std::vector<llvm::AssertingVH<llvm::Instruction>,std::allocator<llvm::AssertingVH<llvm::Instruction>
>
<span class="quote">>::~vector<llvm::AssertingVH<llvm::Instruction>,std::allocator<llvm::AssertingVH<llvm::Instruction>
> >() Line 975    C++</span >
     float-engine-slave.exe!llvm::AliasSet::~AliasSet()    C++
     float-engine-slave.exe!llvm::AliasSet::`scalar deleting
destructor'(unsigned int)    C++
    
float-engine-slave.exe!llvm::ilist_node_traits<llvm::AliasSet>::deleteNode(llvm::AliasSet
* V) Line 160    C++
    
float-engine-slave.exe!llvm::iplist<llvm::AliasSet,llvm::ilist_traits<llvm::AliasSet>
<span class="quote">>::erase(llvm::ilist_iterator<llvm::AliasSet> where) Line 519    C++</span >
    
float-engine-slave.exe!llvm::iplist<llvm::AliasSet,llvm::ilist_traits<llvm::AliasSet>
<span class="quote">>::erase(llvm::ilist_iterator<llvm::AliasSet> first,</span >
llvm::ilist_iterator<llvm::AliasSet> last) Line 601    C++
    
float-engine-slave.exe!llvm::iplist<llvm::AliasSet,llvm::ilist_traits<llvm::AliasSet>
<span class="quote">>::clear() Line 605    C++</span >
     float-engine-slave.exe!llvm::AliasSetTracker::~AliasSetTracker() Line 318 
  C++
     float-engine-slave.exe!llvm::AliasSetTracker::`scalar deleting
destructor'(unsigned int)    C++
     float-engine-slave.exe!llvm::SmallVectorImpl<class llvm::Instruction
*>::reserve(unsigned __int64)    C++
     float-engine-slave.exe!llvm::LPPassManager::runOnFunction(class
llvm::Function &)    C++
     float-engine-slave.exe!llvm::FPPassManager::runOnFunction(class
llvm::Function &)    C++
     float-engine-slave.exe!llvm::CallGraphSCC::ReplaceNode(class
llvm::CallGraphNode *,class llvm::CallGraphNode *)    C++
     float-engine-slave.exe!llvm::CallGraphSCC::ReplaceNode(class
llvm::CallGraphNode *,class llvm::CallGraphNode *)    C++
     float-engine-slave.exe!llvm::CallGraphNode::removeCallEdge(class
std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<struct
std::pair<class llvm::WeakVH,class llvm::CallGraphNode *> > > >)    C++
     float-engine-slave.exe!llvm::FPPassManager::runOnModule(class llvm::Module
&)    C++
     float-engine-slave.exe!llvm::legacy::PassManagerImpl::run(class
llvm::Module &)    C++
        ... (our code)



And in this frame here are the pointers that we have:
[FRAME]
float-engine-slave.exe!llvm::ValueHandleBase::~ValueHandleBase() Line 81    C++

[LOCALS]
-        this    0x00000000063803b0 {PrevPair={Value=0x0000000005ebc308 }
Next=0xddddddddfdfdfdfd {PrevPair={Value=??? } ...} ...}   
llvm::ValueHandleBase *
+        PrevPair    {Value=0x0000000005ebc308 }   
llvm::PointerIntPair<llvm::ValueHandleBase * *,2,enum
llvm::ValueHandleBase::HandleBaseKind,llvm::PointerLikeTypeTraits<llvm::ValueHandleBase
* *>,llvm::PointerIntPairInfo<llvm::ValueHandleBase *
*,2,llvm::PointerLikeTypeTraits<llvm::ValueHandleBase * *> > >
+        Next    0xddddddddfdfdfdfd {PrevPair={Value=??? } Next=??? V=??? }   
llvm::ValueHandleBase *
+        V    0x00000000dddddddd {VTy=??? UseList=??? SubclassID=??? ...}   
llvm::Value *


I hope I provided enough information.
Thank you for your investigation!</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>