llvm-project/compiler-rt/lib/scudo/standalone
Chia-hung Duan 5de73d27bd [scudo] Change region size from 1 MB to 2 MB in tests
In SizeClassAllocator64, the RegionBeg is determined by RegionBase +
random offset. The offset is n pages, where n is a random number less or
equal to 16. However, on certain platforms which have large page size,
it may end up immediately OOM without mapping any block pages. For
example,

PageSize = 64 KB, RegionSize = 1 MB

Suppose the random number n is 16, then the random offset will be
64 * 16 = 1024 KB which is equal to the RegionSize.

On most platforms we don't have such large page size and we have
different PRNG(pseudo random number generator) behaviors, thus we didn't
hit any failures before. Given that this now only affects the tests,
only increase the region size is enough.

Will revisit the logic of calculating the random offset.

Differential Revision: https://reviews.llvm.org/D136025
2022-10-17 20:22:33 +00:00
..
benchmarks [scudo] Get rid of initLinkerInitialized 2021-05-26 09:53:40 -07:00
fuzz scudo: Add support for tracking stack traces of secondary allocations. 2021-03-09 11:43:03 -08:00
include/scudo [scudo] Satisfy -Wstrict-prototypes 2022-07-11 10:28:38 -07:00
tests [scudo] Change region size from 1 MB to 2 MB in tests 2022-10-17 20:22:33 +00:00
tools Use u16 to store Count/MaxCount 2022-10-13 23:35:06 +00:00
CMakeLists.txt [SCUDO] add cmake options for custom sysroot 2022-10-12 15:03:04 -07:00
allocator_config.h Revert "[scudo] Manage free blocks in BatchGroup." 2022-10-14 15:11:57 -05:00
atomic_helpers.h
bytemap.h [scudo] Get rid of initLinkerInitialized 2021-05-26 09:53:40 -07:00
checksum.cpp [scudo] Add missing include for extern variable declaration 2022-03-29 14:26:15 -07:00
checksum.h [NFCI] clang-format scudo standalone 2022-05-18 14:04:04 -07:00
chunk.h [NFCI] clang-format scudo standalone 2022-05-18 14:04:04 -07:00
combined.h [scudo] Use nullptr instead of integer-to-pointer cast 2022-03-17 10:17:36 -07:00
common.cpp [scudo] Rework dieOnMapUnmapError 2021-05-25 08:27:37 -07:00
common.h [scudo] Add Scudo support for Trusty OS 2021-06-08 14:02:10 -07:00
crc32_hw.cpp [NFCI] clang-format scudo standalone 2022-05-18 14:04:04 -07:00
flags.cpp [scudo][standalone] Restore GWP-ASan flag parsing 2021-01-27 12:35:34 -08:00
flags.h
flags.inc [Scudo] Delete unused flag 'rss_limit_mb'. 2021-05-14 13:45:43 -07:00
flags_parser.cpp
flags_parser.h [scudo][standalone] Restore GWP-ASan flag parsing 2021-01-27 12:35:34 -08:00
fuchsia.cpp [scudo][NFC] Clang-format c823cbf699 2022-07-11 17:41:37 +00:00
fuchsia.h [scudo] Clean up Zircon header file uses 2022-05-27 21:39:03 -07:00
internal_defs.h [scudo] Use stdint types for internal types (redo) 2021-08-16 14:46:42 -07:00
linux.cpp Revert "[Scudo] enabling anonymous named pages on Linux 5.17 and onwards." 2022-04-05 16:38:49 +00:00
linux.h
list.h Revert "[scudo] Manage free blocks in BatchGroup." 2022-10-14 15:11:57 -05:00
local_cache.h [scudo] Fix implicitly narrow casting (NFC) 2022-10-15 03:54:53 +00:00
memtag.h Revert "[compiler-rt][scudo] Add missing preprocessor token" and "[compiler-rt][scudo] Simplify TBI checks" 2022-05-24 11:30:31 -07:00
mutex.h [scudo] Get rid of initLinkerInitialized 2021-05-26 09:53:40 -07:00
options.h [scudo] Use require_constant_initialization 2021-05-01 01:46:47 -07:00
platform.h [scudo] Don't assume preprocessor macro is defined 2022-03-18 12:52:18 -07:00
primary32.h Revert "[scudo] Manage free blocks in BatchGroup." 2022-10-14 15:11:57 -05:00
primary64.h Revert "[scudo] Manage free blocks in BatchGroup." 2022-10-14 15:11:57 -05:00
quarantine.h [scudo] Ensure proper allocator alignment in TSD test 2021-06-16 14:21:58 -07:00
release.cpp [scudo] Add PageReleaseContext to convey page usage status. 2022-10-13 23:35:06 +00:00
release.h [scudo] Add PageReleaseContext to convey page usage status. 2022-10-13 23:35:06 +00:00
report.cpp [scudo] Rework Vector/String 2021-06-03 18:12:24 -07:00
report.h
secondary.h [scudo] Fix definition of canCache() function 2022-03-29 14:26:15 -07:00
size_class_map.h Use u16 to store Count/MaxCount 2022-10-13 23:35:06 +00:00
stack_depot.h [scudo] Use require_constant_initialization 2021-05-01 01:46:47 -07:00
stats.h [scudo] Get rid of initLinkerInitialized 2021-05-26 09:53:40 -07:00
string_utils.cpp scudo/standalone: prepare for enabling format string checking 2021-08-13 13:45:30 +02:00
string_utils.h scudo/standalone: prepare for enabling format string checking 2021-08-13 13:45:30 +02:00
trusty.cpp [scudo] Add Scudo support for Trusty OS 2021-06-08 14:02:10 -07:00
trusty.h [scudo] Add Scudo support for Trusty OS 2021-06-08 14:02:10 -07:00
tsd.h [scudo] Ensure proper allocator alignment in TSD test 2021-06-16 14:21:58 -07:00
tsd_exclusive.h [scudo] Fix static and unused function type annotations 2022-03-18 12:52:29 -07:00
tsd_shared.h [scudo] Get rid of initLinkerInitialized 2021-05-26 09:53:40 -07:00
vector.h [scudo] Add [[no_unique_address]] attribute to new MapPlatformData variables 2022-07-07 13:12:55 -07:00
wrappers_c.cpp [scudo] Provide allocator declaration 2022-03-29 17:39:45 -07:00
wrappers_c.h [scudo] Provide allocator declaration 2022-03-29 17:39:45 -07:00
wrappers_c.inc [scudo] Handle mallinfo2 2021-11-16 19:29:37 -08:00
wrappers_c_bionic.cpp [scudo] Use require_constant_initialization 2021-05-01 01:46:47 -07:00
wrappers_c_checks.h [scudo] Use cast on calls to __builtin_umul_overflow/__builtin_umull_overflow 2022-03-28 16:36:30 -07:00
wrappers_cpp.cpp [NFCI] clang-format scudo standalone 2022-05-18 14:04:04 -07:00