-
-
Notifications
You must be signed in to change notification settings - Fork 63
Question: What is [shared pmap]? / False positive? #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a bit of a complex one because a lot of things are coming together at the same time. What is
|
static Bool get_name_from_tag(int tag, HChar* path, SizeT path_len) { |
But what does it actually mean? From the context and your expectations of memcmp
, it is the part of the memory where the DYLD cache is loaded by the kernel.
Why does this show an error?
At start, we load a few dyld explicitly to ensure important symbols (especially for malloc) are loaded by Valgrind, the rest are loaded by the client binary itself. This is important because Valgrind relies on symbol names to replace calls to a lot of functions (called redirections internally).
As many of those core libc functions (like memcmp
) rely on intrinsics and other vectorized tricks for performance (I am not super familiar with the details), they do tend to show a lot of false positives (as they seemingly load memory that's not been initialized).
Unfortunately, it seems that the symbol is not loaded at all. This is usually an issue with the symbol itself being missing from DYLD cache, or it could be a Valgrind bug. Otherwise, memcmp
would be replaced by the Valgrind version.
How do we fix this?
If you are positive that the memory is defined, then it's most likely a false positive from the optimized code from the system memcmp
.
Which architecture/macOS version is this?
I know you have been running Valgrind on amd64 without issue for a while, so if this is happening on there, then it seems like it would a regression, potentially from the (unfortunately extensive) arm64 changes.
If this is arm64, then it's a symbol loading issue or potentially a new entrypoint into memcmp
that Valgrind isn't expecting.
I guess this is more of a question than an issue. The following is from the failure was trying to debug (now with a useful stack strace after #125 merged!):
This line of code in
label_lookup
is a call tomemcmp
(which, I assume from the above, has been optimized by the compiler?). I know_internal_memcmp
is redirect but it does not appear here.I tried
VALGRIND_CHECK_MEM_IS_DEFINED
and it confirms that all bytes in both arguments of the call are defined. So this looks like a false positive?! But to be honest, I have no idea what[shared pmap]
is? I'd appreciate any ideas or pointers, but also feel free to close this as not really actionable (unless we want to add a suppression?)The text was updated successfully, but these errors were encountered: