Commit 422b06d2 authored by James Dinan's avatar James Dinan Committed by Wesley Bland
Browse files

Fix error class buf in MPI_Error_add_code

During error code creation, the error class was erroneously modified by
applying ERROR_DYN_MASK when.  The dynamic bit is already set for
user-defined error classes, so this bug had no effect in all existing
MPICH tests.  However, when a predefined error class was passed during
error code creation, it would be incorrectly marked as dynamic,
resulting in an invalid result when the error class of a returned error
code was returned via MPI_Error_class.
Signed-off-by: default avatarWesley Bland <>
parent 3feca48f
......@@ -256,7 +256,7 @@ int MPIR_Err_add_code( int class )
/* Create the full error code */
new_code = class | ERROR_DYN_MASK | (new_code << ERROR_GENERIC_SHIFT);
new_code = class | (new_code << ERROR_GENERIC_SHIFT);
/* FIXME: For robustness, we should make sure that the associated string
is initialized to null */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment