Updates:
Summary: Miscalculation of ByteMap kSize1 for small mmap ranges on
iOS/AArch64
Comment #3 on issue 265 by [email protected]: Miscalculation of ByteMap
kSize1 for small mmap ranges on iOS/AArch64
http://code.google.com/p/address-sanitizer/issues/detail?id=265
So, on iOS/AArch64 a user program can map addresses between 4G and 6.5Gb,
right?
Since this is so small, I suggest you to use FlatByteMap:
--- lib/sanitizer_common/sanitizer_allocator_internal.h (revision 202117)
+++ lib/sanitizer_common/sanitizer_allocator_internal.h (working copy)
@@ -25,7 +25,7 @@
static const uptr kInternalAllocatorSpace = 0;
static const u64 kInternalAllocatorSize = SANITIZER_MMAP_RANGE_SIZE;
-#if SANITIZER_WORDSIZE == 32
+#if SANITIZER_MMAP_RANGE_SIZE < (1ULL << 36)
static const uptr kInternalAllocatorRegionSizeLog = 20;
static const uptr kInternalAllocatorNumRegions =
kInternalAllocatorSize >> kInternalAllocatorRegionSizeLog;
(You'll need to define SANITIZER_MMAP_RANGE_SIZE to 6.5Gb)
iOS/AArch64 is the first platform for asan where the mmap range does not
start around zero,
so SANITIZER_MMAP_RANGE_SIZE is supposed to be the upper bound of that
range.
Anyway, this does not matter much if we use FlatByteMap.
If at some point we face a platform which has a small mmap range that
starts at huge address
(e.g. 2Gb starting at 40Tb), we'll need some refactoring. But not today.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.