trunk/60f968a6c73628f8f0d1e0f41c8c650ebc2140df: Fix integer overflow in max_pool1d shape checks (#194112)
- PyTorch 近 90 天出现 291 次
- PyTorch 近 90 天第 288 次发版
- 上一次:同一天稍早 · trunk/8ac512dfc2f626e318c1ec93bc624b3f0ab5a0f5
发生了什么
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…
摘要按规则整理自下方来源原文