mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
San: Avoid running san tests with prof enabled
With prof enabled, number of page aligned allocations doesn't match the number of slab "ends" because prof allocations skew the addresses. It leads to 'pages' array overflow and hard to debug failures.
This commit is contained in:
parent
62f9c54d2a
commit
34b00f8969
1 changed files with 4 additions and 0 deletions
|
|
@ -14,6 +14,8 @@ verify_extent_guarded(tsdn_t *tsdn, void *ptr) {
|
|||
void *small_alloc[MAX_SMALL_ALLOCATIONS];
|
||||
|
||||
TEST_BEGIN(test_guarded_small) {
|
||||
test_skip_if(opt_prof);
|
||||
|
||||
tsdn_t *tsdn = tsd_tsdn(tsd_fetch());
|
||||
unsigned npages = 16, pages_found = 0, ends_found = 0;
|
||||
VARIABLE_ARRAY(uintptr_t, pages, npages);
|
||||
|
|
@ -27,6 +29,8 @@ TEST_BEGIN(test_guarded_small) {
|
|||
small_alloc[n_alloc] = ptr;
|
||||
verify_extent_guarded(tsdn, ptr);
|
||||
if ((uintptr_t)ptr % PAGE == 0) {
|
||||
assert_u_lt(pages_found, npages,
|
||||
"Unexpectedly large number of page aligned allocs");
|
||||
pages[pages_found++] = (uintptr_t)ptr;
|
||||
}
|
||||
if (((uintptr_t)ptr + (uintptr_t)sz) % PAGE == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue