Reading Guide

Compute Sanitizer Evidence Pack

case
case02_bmm_sparse
tool
Compute Sanitizer
  • The left pane shows the source excerpt used in the participant packet.
  • The right pane keeps only sanitizer output and program prints.
  • Use these clues to explain why the binary search reads before the array.
First Errorreported line 50

The Log Reports an Invalid Global Read

Invalid __global__ read of size 8 bytes
at searchEndMatrixIndicesCudaKernel in run.cu:50
by thread (0,0,0) in block (0,0,0)
Address 0x7ffd9cfffff8 is out of bounds
8 bytes before the nearest allocation
Host Frame: main in run.cu:108
ERROR SUMMARY: 2 errors
block
(0,0,0)
thread
(0,0,0)
fault address
0x7ffd9cfffff8
relative to allocation
8 bytes before
Runtime Context

Program Prints Narrow the Bad Index

num_matrices
2
num_elements
1
indices logical
[1]
launch
blocks=(1,1,1)
threads=(64,1,1)
initial state
start=0
end=0
mid=0
printed next step
next mid=-1
read indices[-1]
  • The native run aborts later at cudaDeviceSynchronize with launch failure 719.
  • The printed context already tells you the binary search moves from mid=0 to mid=-1.
  • That makes the next load target indices1D[-1], which matches the read-before-allocation report.