@@ -537,28 +537,14 @@ ur_result_t SanitizerInterceptor::enqueueAllocInfo(
537537 }
538538
539539 // Left red zone
540- uptr LeftRZSize = AllocInfo->UserBegin - AllocInfo->AllocBegin ;
541- if (LeftRZSize != 0 ) {
542- UR_CALL (enqueueMemSetShadow (Context, Device, Queue,
543- AllocInfo->AllocBegin , LeftRZSize,
544- ShadowByte, LastEvent, &LastEvent));
545- } else {
546- context.logger .debug (
547- " Try to create empty left red zone, Alloc Begin {}" ,
548- (void *)AllocInfo->AllocBegin );
549- }
540+ UR_CALL (enqueueMemSetShadow (Context, Device, Queue, AllocInfo->AllocBegin ,
541+ AllocInfo->UserBegin - AllocInfo->AllocBegin ,
542+ ShadowByte, LastEvent, &LastEvent));
550543
551544 // Right red zone
552- uptr RightRZSize = TailEnd - TailBegin;
553- if (RightRZSize != 0 ) {
554- UR_CALL (enqueueMemSetShadow (Context, Device, Queue, TailBegin,
555- RightRZSize, ShadowByte, LastEvent,
556- &LastEvent));
557- } else {
558- context.logger .debug (
559- " Try to create empty right red zone, Alloc Begin {}" ,
560- (void *)TailBegin);
561- }
545+ UR_CALL (enqueueMemSetShadow (Context, Device, Queue, TailBegin,
546+ TailEnd - TailBegin, ShadowByte, LastEvent,
547+ &LastEvent));
562548
563549 return UR_RESULT_SUCCESS;
564550}
0 commit comments