Skip to content

Commit c614b19

Browse files
[SYCL][NFC] Fix uninitialized field in SYCLMemObjT (#20513)
Addresses Coverity CIDs `519597` and `519499`. Coverity results are available: https://scan.coverity.com/projects/intel-llvm?tab=overview
1 parent ab23982 commit c614b19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/source/detail/sycl_mem_obj_t.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ class SYCLMemObjT : public SYCLMemObjI {
5656
SYCLMemObjT(const size_t SizeInBytes, const property_list &Props,
5757
std::unique_ptr<SYCLMemObjAllocator> Allocator)
5858
: MAllocator(std::move(Allocator)), MProps(Props), MInteropEvent(nullptr),
59-
MInteropContext(nullptr), MInteropMemObject(nullptr),
60-
MOpenCLInterop(false), MHostPtrReadOnly(false), MNeedWriteBack(true),
59+
MInteropContext(nullptr), MOpenCLInterop(false),
60+
MHostPtrReadOnly(false), MNeedWriteBack(true),
6161
MSizeInBytes(SizeInBytes), MUserPtr(nullptr), MShadowCopy(nullptr),
6262
MUploadDataFunctor(nullptr), MSharedPtrStorage(nullptr),
6363
MHostPtrProvided(false) {}
@@ -342,7 +342,7 @@ class SYCLMemObjT : public SYCLMemObjI {
342342
std::shared_ptr<context_impl> MInteropContext;
343343
// Native backend memory object handle passed by user to interoperability
344344
// constructor.
345-
ur_mem_handle_t MInteropMemObject;
345+
ur_mem_handle_t MInteropMemObject = nullptr;
346346
// Indicates whether memory object is created using interoperability
347347
// constructor or not.
348348
bool MOpenCLInterop;

0 commit comments

Comments
 (0)