trunk/60f968a6c73628f8f0d1e0f41c8c650ebc2140df: Fix integer overflow in max_pool1d shape checks (#194112)
- PyTorch: 287 events in the last 90 days
- PyTorch: 284th Release in the last 90 days
- Previous: earlier the same day · trunk/8ac512dfc2f626e318c1ec93bc624b3f0ab5a0f5
What happened
torch.max_pool1d segfaults for several out-of-domain integer arguments. There are three separate silent integer overflows in the shape math, and all three have to go for the op to be safe — fixing (1) alone makes (3) newly reachable. 1. div_rtn() floor-divides in int static inline T div_rtn(T x, T y) { - int q = x / y; - int r = x % y; + T q = x / y; + T r = x % y;"> template typename T> static inline T div_rtn (T x…
Summary assembled by rule from the sources below