Skip to content

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 [email protected]
(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 <[email protected]>
(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