Skip to content

Commit a8ae97e

Browse files
committed
fix crash
1 parent af29fa0 commit a8ae97e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/loader/layers/sanitizer/asan_interceptor.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,8 @@ SanitizerInterceptor::insertContext(ur_context_handle_t Context,
576576

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

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

581582
return UR_RESULT_SUCCESS;
582583
}
@@ -612,7 +613,8 @@ SanitizerInterceptor::insertDevice(ur_device_handle_t Device,
612613
Device, UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, sizeof(DI->Alignment),
613614
&DI->Alignment, nullptr));
614615

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

617619
return UR_RESULT_SUCCESS;
618620
}

0 commit comments

Comments
 (0)