Skip to content

Commit 35044c8

Browse files
committed
Add assert
1 parent 1a31073 commit 35044c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/loader/layers/sanitizer/asan_interceptor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ SanitizerInterceptor::registerDeviceGlobals(ur_context_handle_t Context,
553553

554554
const uint64_t NumOfDeviceGlobal =
555555
MetadataSize / sizeof(DeviceGlobalInfo);
556+
assert((MetadataSize % sizeof(DeviceGlobalInfo) == 0) &&
557+
"DeviceGlobal metadata size is not correct");
556558
std::vector<DeviceGlobalInfo> GVInfos(NumOfDeviceGlobal);
557559
Result = context.urDdiTable.Enqueue.pfnUSMMemcpy(
558560
Queue, true, &GVInfos[0], MetadataPtr,

0 commit comments

Comments
 (0)