<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 --- - Lots of sketchy behaviour masked by RecyclingAllocator"
href="https://llvm.org/bugs/show_bug.cgi?id=26808">26808</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Lots of sketchy behaviour masked by RecyclingAllocator
</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>All
</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>llvm-bugs@justinbogner.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>Created <span class=""><a href="attachment.cgi?id=15971" name="attach_15971" title="Patch to make Recycler asan-aware">attachment 15971</a> <a href="attachment.cgi?id=15971&action=edit" title="Patch to make Recycler asan-aware">[details]</a></span>
Patch to make Recycler asan-aware
The attached patch teaches Recycler (and by proxy RecyclingAllocator) to poison
and unpoison memory for ASAN. Running ninja check under ASAN with this applied
hits a few thousand failures. Some of the issues include:
- We don't allocate nodes in SelectionDAG correctly - we always call an SDNode
allocator and upcast to the (much larger) subclasses. This mostly works since
the RecyclingAllocator is set to allocate 296 bytes per node.
- SelectionDAG sets node types to "ISD::DELETED_NODE" before returning them to
the free list, ostensibly to detect bugs. Then it *uses whether or not the
thing is deleted* for control flow in places like UpdateChainsAndGlue. This
*should not work*, but apparently it tends to in practice.
- SelectionDAG arbitrarily casts from smaller SDNodes to MachineSDNode in
MorphNodeTo. This is very much undefined behaviour, but basically works since
the allocations happen to be large enough.
- There's probably a use-after-free of `Tail` in
TargetInstrInfo::ReplaceTailWithBranchTo.
- RegisterCoalescer::reMaterializeTrivialDef appears to have use-after-free
bugs regarding MachineInstrs.</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>