diff options
Diffstat (limited to 'compiler-rt/lib/asan/tests/asan_interface_test.cc')
| -rw-r--r-- | compiler-rt/lib/asan/tests/asan_interface_test.cc | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/compiler-rt/lib/asan/tests/asan_interface_test.cc b/compiler-rt/lib/asan/tests/asan_interface_test.cc index 521853ec756..44a93f9923d 100644 --- a/compiler-rt/lib/asan/tests/asan_interface_test.cc +++ b/compiler-rt/lib/asan/tests/asan_interface_test.cc @@ -44,16 +44,14 @@ TEST(AddressSanitizerInterface, GetAllocatedSizeAndOwnershipTest) {    // We cannot call GetAllocatedSize from the memory we didn't map,    // and from the interior pointers (not returned by previous malloc).    void *wild_addr = (void*)0x1; +  EXPECT_EQ(false, __asan_get_ownership(NULL)); +  EXPECT_DEATH(__asan_get_allocated_size(NULL), kGetAllocatedSizeErrorMsg);    EXPECT_EQ(false, __asan_get_ownership(wild_addr));    EXPECT_DEATH(__asan_get_allocated_size(wild_addr), kGetAllocatedSizeErrorMsg);    EXPECT_EQ(false, __asan_get_ownership(array + kArraySize / 2));    EXPECT_DEATH(__asan_get_allocated_size(array + kArraySize / 2),                 kGetAllocatedSizeErrorMsg); -  // NULL is a valid argument and is owned. -  EXPECT_EQ(true, __asan_get_ownership(NULL)); -  EXPECT_EQ(0, __asan_get_allocated_size(NULL)); -    // When memory is freed, it's not owned, and call to GetAllocatedSize    // is forbidden.    free(array); | 

