<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 - XRay trampolines may leave the stack unaligned"
href="https://bugs.llvm.org/show_bug.cgi?id=35294">35294</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>XRay trampolines may leave the stack unaligned
</td>
</tr>
<tr>
<th>Product</th>
<td>XRay
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>Runtime
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dberris@google.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dberris@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>In some situations when the XRay tracing system has been turned off in the
middle of the execution of any one of __xray_Function{Entry,Exit,TailExit} and
__xray_ArgLoggerEntry and the handlers have been un-installed, we could be left
in an unaligned stack state.
In other cases, we might have a handler that doesn't leave the stack aligned in
a specific state after returning, and could be in a situation where the stack
is unaligned after the instrumentation is turned off.
We should fix the trampolines to adhere to the Linux x86_64 ABI and align the
stack to 16-byte addresses always before calling a function, and re-aligning
the stack before restoring the state of the registers and returning. In
particular, we already do this correctly for the __xray_CustomEvent trampoline,
we just need to port the same implementation across the other trampolines.</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>