PyTorch fixes silent out-of-bounds read in compiled kernels
Strided and offset tensor paths in the compiler could read past valid memory without raising an error.
PyTorch has merged a fix for a silent out-of-bounds read that could occur when compiled kernels operated on strided or offset tensors.
The bug let the compiler-generated code access memory outside the intended buffer without signaling a failure. Callers using advanced indexing, views, or non-contiguous layouts were exposed to wrong results or undefined behavior that left no clear traceback.
Silent memory-safety failures of this kind are especially costly in production training and inference stacks, where tensor strides and offsets are common and where an undetected read can corrupt gradients or outputs long before anyone notices. The change closes that path so out-of-range access is no longer quietly ignored.
The pull request was merged via the project’s bot after the usual review cycle.