Skip to content

Commit 619e575

Browse files
committed
Address @b-sumner comments.
1 parent 8681926 commit 619e575

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler-rt/lib/asan/asan_allocator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,13 +1553,13 @@ hsa_status_t asan_hsa_amd_pointer_info(const void* ptr,
15531553
void* (*alloc)(size_t),
15541554
uint32_t* num_agents_accessible,
15551555
hsa_agent_t** accessible) {
1556-
void* p = get_allocator().GetBlockBegin(ptr);
1557-
AsanChunk* m = instance.GetAsanChunkByAddr(reinterpret_cast<uptr>(p));
1556+
void* ptr_ = get_allocator().GetBlockBegin(ptr);
1557+
AsanChunk* m = instance.GetAsanChunkByAddr(reinterpret_cast<uptr>(ptr_));
15581558
hsa_status_t status;
1559-
if (p && m)
1559+
if (ptr_ && m)
15601560
status = REAL(hsa_amd_pointer_info)(ptr, info, alloc, num_agents_accessible,
15611561
accessible);
1562-
if (status == HSA_STATUS_SUCCESS && info && p && m) {
1562+
if (status == HSA_STATUS_SUCCESS && info && ptr_ && m) {
15631563
static_assert(AP_.kMetadataSize == 0, "Expression below requires this");
15641564
info->agentBaseAddress = reinterpret_cast<void*>(
15651565
reinterpret_cast<uptr>(info->agentBaseAddress) + kPageSize_);

0 commit comments

Comments
 (0)