[PATCH] D153471: [lsan][Darwin] Unconditionally strip high bits from potential pointers
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 09:11:47 PDT 2023
yln added a comment.
Hi Leonard, thanks for this fix!
LGTM, with one nit: can you update the function name and comments to reflect the new behavior?
================
Comment at: compiler-rt/lib/lsan/lsan_common.cpp:176-180
// Objective-C class data pointers are stored with flags in the low bits, so
// they need to be transformed back into something that looks like a pointer.
static inline void *MaybeTransformPointer(void *p) {
uptr ptr = reinterpret_cast<uptr>(p);
+ return reinterpret_cast<void *>(ptr & OBJC_DATA_MASK);
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153471/new/
https://reviews.llvm.org/D153471
More information about the llvm-commits
mailing list