Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/loader/layers/sanitizer/asan_interceptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ ur_result_t SanitizerInterceptor::releaseMemory(ur_context_handle_t Context,
}

auto AllocInfoIt = *AllocInfoItOp;
auto &AllocInfo = AllocInfoIt->second;
// AllocInfo is a shared_ptr and we need to keep a copy to avoid early release
auto AllocInfo = AllocInfoIt->second;

if (AllocInfo->Context != Context) {
if (AllocInfo->UserBegin == Addr) {
Expand Down