test/func/memory: use pointer_offset to compute pointer offset
This avoids the CHERI compiler warning that we're turning a provenance-free value to a pointer. Co-authored-by: Matthew Parkinson <mattpark@microsoft.com>
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
f103f1c443
commit
87e41559b2
@@ -255,7 +255,7 @@ void test_external_pointer()
|
||||
if ((size_t)p4 != (size_t)p1 + size - 1)
|
||||
{
|
||||
std::cout << "size: " << size << " end(p4): " << p4 << " p1: " << p1
|
||||
<< " p1+size-1: " << (void*)((size_t)p1 + size - 1)
|
||||
<< " p1+size-1: " << pointer_offset(p1, size - 1)
|
||||
<< std::endl;
|
||||
}
|
||||
SNMALLOC_CHECK((size_t)p4 == (size_t)p1 + size - 1);
|
||||
|
||||
Reference in New Issue
Block a user