Rename san_enabled() to san_guard_enabled().

This commit is contained in:
Qi Wang 2021-12-28 13:01:17 -08:00 committed by Qi Wang
parent 01d61a3c6f
commit dfdd7562f5
3 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ san_one_side_guarded_sz(size_t size) {
}
static inline bool
san_enabled(void) {
san_guard_enabled(void) {
return (opt_san_guard_large != 0 || opt_san_guard_small != 0);
}

View File

@ -129,7 +129,7 @@ TEST_BEGIN(test_hpa_background_thread_purges) {
test_skip_if(!hpa_supported());
test_skip_if(!have_background_thread);
/* Skip since guarded pages cannot be allocated from hpa. */
test_skip_if(san_enabled());
test_skip_if(san_guard_enabled());
unsigned arena_ind = create_arena();
/*
@ -145,7 +145,7 @@ TEST_BEGIN(test_hpa_background_thread_enable_disable) {
test_skip_if(!hpa_supported());
test_skip_if(!have_background_thread);
/* Skip since guarded pages cannot be allocated from hpa. */
test_skip_if(san_enabled());
test_skip_if(san_guard_enabled());
unsigned arena_ind = create_arena();

View File

@ -104,7 +104,7 @@ TEST_BEGIN(test_retained) {
arena_ind = do_arena_create(NULL);
sz = nallocx(HUGEPAGE, 0);
size_t guard_sz = san_enabled() ? SAN_PAGE_GUARDS_SIZE : 0;
size_t guard_sz = san_guard_enabled() ? SAN_PAGE_GUARDS_SIZE : 0;
esz = sz + sz_large_pad + guard_sz;
atomic_store_u(&epoch, 0, ATOMIC_RELAXED);