Commit 7d59d14d authored by Su Huang's avatar Su Huang Committed by Sameh Sharkawi
Browse files

PAMID:MP_STATISTICS=print will cause mpi hw case coredump



 The segfault was caused by the library trying to free an already freed mpid_statp
 structure. The structure is freed right after the status information is printed.
 To fix the problem, the mpid_statp is set to NULL after the free is done.

 (ibm) D202018
Signed-off-by: default avatarSameh Sharkawi <sssharka@us.ibm.com>
parent 4be54219
......@@ -800,10 +800,16 @@ void MPIDI_print_statistics() {
(MPIDI_Process.mp_printenv)) {
if (MPIDI_Process.mp_statistics) {
MPIDI_Statistics_write(stdout);
if (mpid_statp) MPIU_Free(mpid_statp);
if (mpid_statp) {
MPIU_Free(mpid_statp);
mpid_statp=NULL;
}
}
if (MPIDI_Process.mp_printenv) {
if (mpich_env) MPIU_Free(mpich_env);
if (mpich_env) {
MPIU_Free(mpich_env);
mpich_env=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