Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZyne committed Apr 3, 2024
1 parent af29fa0 commit a8ae97e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/loader/layers/sanitizer/asan_interceptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ SanitizerInterceptor::insertContext(ur_context_handle_t Context,

CI = std::make_shared<ContextInfo>(Context);

m_ContextMap.emplace(Context, std::move(CI));
// Don't move CI, since it's a return value as well
m_ContextMap.emplace(Context, CI);

return UR_RESULT_SUCCESS;
}
Expand Down Expand Up @@ -612,7 +613,8 @@ SanitizerInterceptor::insertDevice(ur_device_handle_t Device,
Device, UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, sizeof(DI->Alignment),
&DI->Alignment, nullptr));

m_DeviceMap.emplace(Device, std::move(DI));
// Don't move DI, since it's a return value as well
m_DeviceMap.emplace(Device, DI);

return UR_RESULT_SUCCESS;
}
Expand Down

0 comments on commit a8ae97e

Please sign in to comment.