@@ -537,28 +537,14 @@ ur_result_t SanitizerInterceptor::enqueueAllocInfo(
537
537
}
538
538
539
539
// 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));
550
543
551
544
// 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));
562
548
563
549
return UR_RESULT_SUCCESS;
564
550
}
0 commit comments