diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2021-11-12 10:06:20 +0100 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2021-11-12 12:53:47 +0100 |
commit | a6728382c6de6211499ab83d708655947c8ce052 (patch) | |
tree | 4f135876454b873ba8a3fb69368e88d17756d9b2 /lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h | |
parent | c3e07df6076045540574ce4fa5362742b52d91db (diff) | |
download | llvm-a6728382c6de6211499ab83d708655947c8ce052.zip llvm-a6728382c6de6211499ab83d708655947c8ce052.tar.gz llvm-a6728382c6de6211499ab83d708655947c8ce052.tar.bz2 |
tsan: fix XMM register corruption in hacky call
The compiler does not recognize HACKY_CALL as a call
(we intentionally hide it from the compiler so that it can
compile non-leaf functions as leaf functions).
To compensate for that hacky call thunk saves and restores
all caller-saved registers. However, it saves only
general-purposes registers and does not save XMM registers.
This is a latent bug that was masked up until a recent "NFC" commit
d736002e90 ("tsan: move memory access functions to a separate file"),
which allowed more inlining and exposed the 10-year bug.
Save and restore caller-saved XMM registers (all) as well.
Currently the bug manifests as e.g. frexp interceptor messes the
return value and the added test fails with:
i=8177 y=0.000000 exp=4
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D113742
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h')
0 files changed, 0 insertions, 0 deletions