[PATCH] D29994: Use pthreads for thread-local lsan allocator cache on darwin
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 13:02:49 PST 2017
kubamracek added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_allocator_primary64.h:49-50
public:
- static const uptr kSpaceBeg = Params::kSpaceBeg;
- static const uptr kSpaceSize = Params::kSpaceSize;
+ static const u64 kSpaceBeg = Params::kSpaceBeg;
+ static const u64 kSpaceSize = Params::kSpaceSize;
static const uptr kMetadataSize = Params::kMetadataSize;
----------------
fjricci wrote:
> kubamracek wrote:
> > fjricci wrote:
> > > kubamracek wrote:
> > > > Why is this necessary? I mean, the change looks reasonable, but is it related to this change? If not, please submit it as a separate patch.
> > > It's necessary, at least on Darwin, because you'll overflow the type if you use a uptr to store a ULL. I'll move it to a separate patch.
> > This whole class should be ifdef'd to only compile on 64-bit platforms. Isn't that so?
> On non-windows platforms, `uptr` is defined as an `unsigned long`, not an `unsigned long long` (sanitizer_internal_defs.h:103)
Right, and `unsigned long` is 64-bit on (supported) 64-bit platforms, isn't it?
https://reviews.llvm.org/D29994
More information about the llvm-commits
mailing list