Skip to content

Commit 509035d

Browse files
authored
Merge pull request #1883 from aarongreig/aaron/asanObjectLifetimeIssues
Don't retain device handle references in sanitizer layer.
2 parents c1d8162 + cb5cb6e commit 509035d

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

source/loader/layers/sanitizer/asan_interceptor.hpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,10 @@ 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+
// TODO: re-enable retaining and releasing device handles in DeviceInfo
49+
// constructor/destructor. See PR
50+
// https://github.com/oneapi-src/unified-runtime/pull/1883
51+
explicit DeviceInfo(ur_device_handle_t Device) : Handle(Device) {}
5952

6053
ur_result_t allocShadowMemory(ur_context_handle_t Context);
6154
};

0 commit comments

Comments
 (0)