From 2d40493c314f6a139ce9cce8ea004c53dadd200f Mon Sep 17 00:00:00 2001 From: Shane Xiao Date: Fri, 20 Dec 2024 10:23:34 +0800 Subject: [PATCH] rocr: Fix missed read lock in ExecutableImpl::FindHostAddress Change-Id: Ide9b5cc3aa235d3768ebbfd8dc1560bf70fd0743 Signed-off-by: Shane Xiao Reviewed-by: Qiang Yu --- runtime/hsa-runtime/loader/executable.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/hsa-runtime/loader/executable.cpp b/runtime/hsa-runtime/loader/executable.cpp index 807402969c..6425416d7d 100644 --- a/runtime/hsa-runtime/loader/executable.cpp +++ b/runtime/hsa-runtime/loader/executable.cpp @@ -1088,6 +1088,7 @@ hsa_executable_t AmdHsaCodeLoader::FindExecutable(uint64_t device_address) uint64_t ExecutableImpl::FindHostAddress(uint64_t device_address) { + ReaderLockGuard reader_lock(rw_lock_); for (auto &obj : loaded_code_objects) { assert(obj); for (auto &seg : obj->LoadedSegments()) {