test/func/malloc: align check as size_t
If the test happens as uintptr_t on CHERI, then we attempt to construct a capability and use a capability-based test rather than an integer-based one, and things go south.
This commit is contained in:
@@ -21,7 +21,7 @@ void check_result(size_t size, size_t align, void* p, int err, bool null)
|
||||
if (our_malloc_usable_size(p) < size)
|
||||
abort();
|
||||
|
||||
if (((uintptr_t)p % align) != 0)
|
||||
if (static_cast<size_t>(reinterpret_cast<uintptr_t>(p) % align) != 0)
|
||||
abort();
|
||||
|
||||
our_free(p);
|
||||
|
||||
Reference in New Issue
Block a user