@@ -691,11 +691,11 @@ void ErrorNonSelfGeneric::Print() {
691
691
Decorator d;
692
692
Printf (" %s" , d.Error ());
693
693
Report (" ERROR: AddressSanitizer: %s on address %p at pc %p\n " , bug_descr,
694
- (void *)addresses[0 ], callstack[0 ]);
694
+ (void *)addresses[0 ], ( void *) callstack[0 ]);
695
695
696
696
Printf (" %s%s of size %zu at %p thread id %zu\n " , d.Access (),
697
697
access_size ? (is_write ? " WRITE" : " READ" ) : " ACCESS" , access_size,
698
- (void *)addresses[0 ], thread_id[0 ]);
698
+ (void *)addresses[0 ], (usize) thread_id[0 ]);
699
699
700
700
// todo: perform symbolization for the given callstack
701
701
// can be done by creating in-memory object file or by writing
@@ -733,7 +733,7 @@ ErrorNonSelfAMDGPU::ErrorNonSelfAMDGPU(uptr *dev_callstack, u32 n_callstack,
733
733
734
734
void ErrorNonSelfAMDGPU::PrintStack () {
735
735
InternalScopedString source_location;
736
- source_location.AppendF (" #0 %p" , callstack[0 ]);
736
+ source_location.AppendF (" #0 %p" , ( void *) callstack[0 ]);
737
737
#if SANITIZER_AMDGPU
738
738
source_location.Append (" in " );
739
739
__sanitizer::AMDGPUCodeObjectSymbolizer symbolizer;
@@ -754,7 +754,8 @@ void ErrorNonSelfAMDGPU::PrintThreadsAndAddresses() {
754
754
str.Append (" \n " );
755
755
per_row_count = 0 ;
756
756
}
757
- str.AppendF (" %02d : %p " , workitem_ids[idx], device_address[idx]);
757
+ str.AppendF (" %02d : %p " , (int )workitem_ids[idx],
758
+ (void *)device_address[idx]);
758
759
per_row_count++;
759
760
}
760
761
str.Append (" \n " );
@@ -797,11 +798,12 @@ void ErrorNonSelfAMDGPU::PrintMallocStack() {
797
798
uptr plo = ScanForMagicDown (start, lo, magic, lo);
798
799
if (plo) {
799
800
callstack[0 ] = ((uptr*)plo)[2 ];
800
- Printf (" %s%p is %u bytes above an address from a %sdevice malloc "
801
- " (or free) call of size %u from%s\n " ,
802
- d.Location (), device_address[0 ],
803
- (int )(device_address[0 ] - (plo+offset)),
804
- d.Allocation (), ((int *)plo)[7 ], d.Default ());
801
+ Printf (
802
+ " %s%p is %u bytes above an address from a %sdevice malloc "
803
+ " (or free) call of size %u from%s\n " ,
804
+ d.Location (), (void *)device_address[0 ],
805
+ (u32 )(device_address[0 ] - (plo + offset)), d.Allocation (),
806
+ ((u32 *)plo)[7 ], d.Default ());
805
807
// TODO: The code object with the malloc call may not be the same
806
808
// code object trying the illegal access. A mechanism is needed
807
809
// to obtain the former.
@@ -811,12 +813,13 @@ void ErrorNonSelfAMDGPU::PrintMallocStack() {
811
813
uptr phi = ScanForMagicUp (start, hi, magic, lo);
812
814
if (phi) {
813
815
callstack[0 ] = ((uptr*)phi)[2 ];
814
- Printf (" %s%p is %u bytes below an address from a %sdevice malloc "
815
- " (or free) call of size %u from%s\n " ,
816
- d.Location (), device_address[0 ],
817
- (int )((phi+offset) - device_address[0 ]),
816
+ Printf (
817
+ " %s%p is %u bytes below an address from a %sdevice malloc "
818
+ " (or free) call of size %u from%s\n " ,
819
+ d.Location (), (void *)device_address[0 ],
820
+ (u32 )((phi + offset) - device_address[0 ]),
818
821
819
- d.Allocation (), ((int *)phi)[7 ], d.Default ());
822
+ d.Allocation (), ((u32 *)phi)[7 ], d.Default ());
820
823
PrintStack ();
821
824
}
822
825
}
@@ -825,10 +828,11 @@ void ErrorNonSelfAMDGPU::PrintMallocStack() {
825
828
void ErrorNonSelfAMDGPU::Print () {
826
829
Decorator d;
827
830
Printf (" %s" , d.Error ());
828
- Report (" ERROR: AddressSanitizer: %s on amdgpu device %zu at pc %p\n " ,
829
- bug_descr, device_id, callstack[0 ]);
830
- Printf (" %s%s of size %zu in workgroup id (%zu,%zu,%zu)\n " , d.Access (),
831
- (is_write ? " WRITE" : " READ" ), access_size, wg.idx , wg.idy , wg.idz );
831
+ Report (" ERROR: AddressSanitizer: %s on amdgpu device %d at pc %p\n " ,
832
+ bug_descr, device_id, (void *)callstack[0 ]);
833
+ Printf (" %s%s of size %zu in workgroup id (%llu,%llu,%llu)\n " , d.Access (),
834
+ (is_write ? " WRITE" : " READ" ), access_size, wg.idx ,
835
+ wg.idy , wg.idz );
832
836
Printf (" %s" , d.Default ());
833
837
PrintStack ();
834
838
Printf (" %s" , d.Location ());
0 commit comments