[PATCH] D153471: [lsan][Darwin] Unconditionally strip high bits from potential pointers
Leonard Grey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 12:59:29 PDT 2023
lgrey marked an inline comment as done.
lgrey added inline comments.
================
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);
----------------
yln wrote:
>
Done (but worded differently since it's not just class pointers)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153471/new/
https://reviews.llvm.org/D153471
More information about the llvm-commits
mailing list