Skip to content

Commit 55539ac

Browse files
aarongreigpbalcer
authored andcommitted
Don't retain device handle references in sanitizer layer.
1 parent c1d8162 commit 55539ac

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

source/loader/layers/sanitizer/asan_interceptor.hpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,7 @@ struct DeviceInfo {
4545
std::queue<std::shared_ptr<AllocInfo>> Quarantine;
4646
size_t QuarantineSize = 0;
4747

48-
explicit DeviceInfo(ur_device_handle_t Device) : Handle(Device) {
49-
[[maybe_unused]] auto Result =
50-
getContext()->urDdiTable.Device.pfnRetain(Device);
51-
assert(Result == UR_RESULT_SUCCESS);
52-
}
53-
54-
~DeviceInfo() {
55-
[[maybe_unused]] auto Result =
56-
getContext()->urDdiTable.Device.pfnRelease(Handle);
57-
assert(Result == UR_RESULT_SUCCESS);
58-
}
48+
explicit DeviceInfo(ur_device_handle_t Device) : Handle(Device) {}
5949

6050
ur_result_t allocShadowMemory(ur_context_handle_t Context);
6151
};

0 commit comments

Comments
 (0)