Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libnbc DI fix for reduce_scatter #9613

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

jjhursey
Copy link
Member

@jjhursey jjhursey commented Nov 2, 2021

  • If the count x dt_extent is greater than INT_MAX then this
    will overflow the offset variable used to offset the buffer.
    The result was that the offset overflowed becoming negative
    causing the reduction to be performed in the incorrect memory
    location producing a wrong answer in the resulting buffers.
  • By preserving this value as a size_t we avoid the int overflow
    at the root of the problem.

Signed-off-by: Joshua Hursey jhursey@us.ibm.com
(cherry picked from commit 944a360)

 * If the `count x dt_extent` is greater than INT_MAX then this
   will overflow the `offset` variable used to offset the buffer.
   The result was that the offset overflowed becoming negative
   causing the reduction to be performed in the incorrect memory
   location producing a wrong answer in the resulting buffers.
 * By preserving this value as a size_t we avoid the int overflow
   at the root of the problem.

Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
(cherry picked from commit 944a360)
@hppritcha
Copy link
Member

@gpaulsen could you double check?

@gpaulsen gpaulsen merged commit df9c387 into open-mpi:v4.0.x Nov 4, 2021
@jjhursey jjhursey deleted the fix-libnbc-di-v40 branch November 5, 2021 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants