https://bugs.llvm.org/show_bug.cgi?id=35294

            Bug ID: 35294
           Summary: XRay trampolines may leave the stack unaligned
           Product: XRay
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Runtime
          Assignee: dber...@google.com
          Reporter: dber...@google.com
                CC: llvm-bugs@lists.llvm.org

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to