aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectScript.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2024-02-05 10:19:26 -0800
committerGitHub <noreply@github.com>2024-02-05 10:19:26 -0800
commitdd70aef05a86bb0c1e04c49cc1bd0457ca362ce3 (patch)
treea610e88c9e717725b555dfb8934606b80823cc9e /lldb/source/Commands/CommandObjectScript.cpp
parent2096e57905a20903f668848ffd11e6130bfa58e2 (diff)
downloadllvm-dd70aef05a86bb0c1e04c49cc1bd0457ca362ce3.zip
llvm-dd70aef05a86bb0c1e04c49cc1bd0457ca362ce3.tar.gz
llvm-dd70aef05a86bb0c1e04c49cc1bd0457ca362ce3.tar.bz2
[x86_64][windows][swift] do not use Swift async extended frame for wi… (#80468)
…ndows x86_64 targets that use windows 64 prologue Windows x86_64 stack frame layout is currently not compatible with Swift's async extended frame, which reserves the slot right below RBP (RBP-8) for the async context pointer, as it doesn't account for the fact that a stack object in a win64 frame can be allocated at the same location. This can cause issues at runtime, for instance, Swift's TCA test code has functions that fail because of this issue, as they spill a value to that slack slot, which then gets overwritten by a store into address returned by the @llvm.swift.async.context.addr() intrinsic (that ends up being RBP - 8), leading to an incorrect value being used at a later point when that stack slot is being read from again. This change drops the use of async extended frame for windows x86_64 subtargets and instead uses the x32 based approach of allocating a separate stack slot for the stored async context pointer. Additionally, LLDB which is the primary consumer of the extended frame makes assumptions like checking for a saved previous frame pointer at the current frame pointer address, which is also incompatible with the windows x86_64 frame layout, as the previous frame pointer is not guaranteed to be stored at the current frame pointer address. Therefore the extended frame layout can be turned off to fix the current miscompile without introducing regression into LLDB for windows x86_64 as it already doesn't work correctly. I am still investigating what should be made for LLDB to support using an allocated stack slot to store the async frame context instead of being located at RBP - 8 for windows.
Diffstat (limited to 'lldb/source/Commands/CommandObjectScript.cpp')
0 files changed, 0 insertions, 0 deletions