Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
policies: fix overflow in
calc_factor
Problem: issue #1129 reported `EOVERFLOW` errors for match requests for thousands of CPUs and GPUs. Currently, `calc_factor` computes the tie breaking factor with modular arithmetic. The computation returns -1 when `break_tie` is divisible by `m_multiply_by`. The negative value of `tie` causes the following integer check to overflow, generating a spurious `EOVERFLOW` errno. Fix the computation to ensure `tie` is strictly positive with `abs()`.
- Loading branch information