Skip to content

Conversation

naughtont3
Copy link
Contributor

Avoid possible data race that could result in off-by-one issue when setting MPI_LASTUSEDCODE attribute after during MPI_Add_error_{class,code} or MPI_Remove_error_{class,code}.

Addresses coverity CID 1666426, 1666427 (missing_lock)

Also includes some formatting cleanup in files.

@naughtont3 naughtont3 force-pushed the tjn-fixdatarace-lastused branch from 23f59ad to 30120f5 Compare October 3, 2025 03:00
@naughtont3 naughtont3 marked this pull request as draft October 3, 2025 03:07
Avoid possible data race that could result in off-by-one
issue when setting MPI_LASTUSEDCODE attribute during
MPI_Add_error_{class,code} or MPI_Remove_error_{class,code}.

Addresses coverity CID 1666426, 1666427 (missing_lock)

Also includes some formatting cleanup in files.

Signed-off-by: Thomas Naughton <[email protected]>
@naughtont3 naughtont3 force-pushed the tjn-fixdatarace-lastused branch from af6f0f7 to 6d3ee24 Compare October 3, 2025 04:24
@naughtont3
Copy link
Contributor Author

note to self: todo - double check can not get less than lastcode on return from remove_errcode/errclass that would cause caller to put bogus value for attribute.

@naughtont3 naughtont3 marked this pull request as ready for review October 8, 2025 17:01
@naughtont3 naughtont3 requested a review from jsquyres October 8, 2025 17:01
@naughtont3
Copy link
Contributor Author

@jsquyres This should resolve Coverity issues and fix a bug found while testing with thread-multiple

@naughtont3
Copy link
Contributor Author

https://github.com/open-mpi/ompi-tests-public/tree/master/environ-mgmt

  ./autogen.sh && ./configure && make
  mpirun -np 1 ./src/test_add_del_err_codes_pthreads

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.

1 participant