You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add overflow checks to reduce-nd workspace size computation
The workspace size for reduce operations is computed by multiplying
normalized input shape dimensions as size_t values. On 32-bit
platforms, this can overflow to zero or a small value, causing an
undersized workspace allocation that the reduction kernel then
writes past.
Add __builtin_mul_overflow checks to both the innermost and
non-innermost reduction paths, returning xnn_status_invalid_parameter
when the workspace size would overflow.
Co-Authored-By: Tristan Madani <tristmd+ai@gmail.com>
0 commit comments