diff options
author | Thurston Dang <thurston@google.com> | 2025-06-24 20:33:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-24 20:33:11 -0700 |
commit | c85466dcd485d4a1320eec9cbf32bd47ff90464f (patch) | |
tree | 1154495370ded16e21f5b8f81ea8e2673e403a8e /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 3de2af3ef56c66de2f20695fc8854684095f5d50 (diff) | |
download | llvm-c85466dcd485d4a1320eec9cbf32bd47ff90464f.zip llvm-c85466dcd485d4a1320eec9cbf32bd47ff90464f.tar.gz llvm-c85466dcd485d4a1320eec9cbf32bd47ff90464f.tar.bz2 |
Reapply "[msan] Automatically print shadow for failing outlined checks" (#145611) (#145615)
This reverts commit 5eb5f0d8760c6b757c1da22682b5cf722efee489 i.e.,
relands 1b71ea411a9d36705663b1724ececbdfec7cc98c.
Test case was failing on aarch64 because the long double type is
implemented differently on x86 vs aarch64. This reland restricts the
test to x86.
----
Original CL description:
A commonly used aid for debugging MSan reports is
`__msan_print_shadow()`, which requires manual app code annotations
(typically of the variable in the UUM report or nearby). This is in
contrast to ASan, which automatically prints out the shadow map when a
check fails.
This patch changes MSan to print the shadow that failed an outlined
check (checks are outlined per function after the
`-msan-instrumentation-with-call-threshold` is exceeded) if verbosity >=
1. Note that we do not print out the shadow map of "neighboring"
variables because this is technically infeasible; see "Caveat" below.
This patch can be easier to use than `__msan_print_shadow()` because
this does not require manual app code annotations. Additionally, due to
optimizations, `__msan_print_shadow()` calls can sometimes spuriously
affect whether a variable is initialized.
As a side effect, this patch also enables outlined checks for
arbitrary-sized shadows (vs. the current hardcoded handlers for
{1,2,4,8}-byte shadows).
Caveat: the shadow does not necessarily correspond to an individual user
variable, because MSan instrumentation may combine and/or truncate
multiple shadows prior to emitting a check that the mangled shadow is
zero (e.g., `convertShadowToScalar()`,
`handleSSEVectorConvertIntrinsic()`, `materializeInstructionChecks()`).
OTOH it is arguably a strength that this feature emit the shadow that
directly matters for the MSan check, but which cannot be obtained using
the MSan API.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
0 files changed, 0 insertions, 0 deletions