Skip to content

Commit

Permalink
rocr: Fix missed read lock in ExecutableImpl::FindHostAddress
Browse files Browse the repository at this point in the history
Change-Id: Ide9b5cc3aa235d3768ebbfd8dc1560bf70fd0743
Signed-off-by: Shane Xiao <[email protected]>
Reviewed-by: Qiang Yu <[email protected]>
  • Loading branch information
Shane Xiao authored and Flora Cui committed Dec 30, 2024
1 parent 0f507e7 commit 2d40493
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/hsa-runtime/loader/executable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,7 @@ hsa_executable_t AmdHsaCodeLoader::FindExecutable(uint64_t device_address)

uint64_t ExecutableImpl::FindHostAddress(uint64_t device_address)
{
ReaderLockGuard<ReaderWriterLock> reader_lock(rw_lock_);
for (auto &obj : loaded_code_objects) {
assert(obj);
for (auto &seg : obj->LoadedSegments()) {
Expand Down

0 comments on commit 2d40493

Please sign in to comment.