mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 14:09:31 +03:00
fix asan/valgrind api fill test
This commit is contained in:
parent
824fd8a7b1
commit
134b23b921
1 changed files with 3 additions and 2 deletions
|
@ -271,7 +271,7 @@ int main(void) {
|
|||
mi_free(p);
|
||||
};
|
||||
|
||||
|
||||
#if !(MI_TRACK_VALGRIND || MI_TRACK_ASAN)
|
||||
CHECK_BODY("fill-freed-small") {
|
||||
size_t malloc_size = MI_SMALL_SIZE_MAX / 2;
|
||||
uint8_t* p = (uint8_t*)mi_malloc(malloc_size);
|
||||
|
@ -286,6 +286,7 @@ int main(void) {
|
|||
// First sizeof(void*) bytes will contain housekeeping data, skip these
|
||||
result = check_debug_fill_freed(p + sizeof(void*), malloc_size - sizeof(void*));
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
@ -309,7 +310,7 @@ bool check_zero_init(uint8_t* p, size_t size) {
|
|||
|
||||
#if MI_DEBUG >= 2
|
||||
bool check_debug_fill_uninit(uint8_t* p, size_t size) {
|
||||
#if MI_TRACK_VALGRIND
|
||||
#if MI_TRACK_VALGRIND || MI_TRACK_ASAN
|
||||
(void)p; (void)size;
|
||||
return true; // when compiled with valgrind we don't init on purpose
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue