From: Arnaud Giersch Date: Tue, 8 Jun 2021 13:20:43 +0000 (+0200) Subject: Plug memory leaks with tests mpich3-test/rma/linked_list_*. X-Git-Tag: v3.28~125 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ceef125523c5dc9bb2de76668f68e8c5443fddcb Plug memory leaks with tests mpich3-test/rma/linked_list_*. --- diff --git a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt index 908dcdda06..cd55ee6c34 100644 --- a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt @@ -18,10 +18,9 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) lockall_dt lockall_dt_flushall lock_dt_flush lockall_dt_flush lockall_dt_flushlocalall lockall_dt_flushlocal lock_dt_flushlocal strided_acc_onelock strided_get_indexed strided_putget_indexed contention_put contention_putget lockcontention3 adlb_mimic1 lock_contention_dt acc-loc get_acc_local get_accumulate put_base put_bottom - linked_list_bench_lock_all linked_list_bench_lock_excl manyrma2 pscw_ordering rma-contig get-struct + manyrma2 pscw_ordering rma-contig get-struct rput_local_comp racc_local_comp rget-testall win_shared win_shared_put_flush_get atomic_get) # fence_shm fetchandadd_am fetchandadd fetchandadd_tree_am fetchandadd_tree - # linked_list_bench_lock_shr linked_list linked_list_fop linked_list_lockall # mcs-mutex mixedsync mutex_bench reqops # strided_getacc_indexed_shared rget-unlock # win_flavors win_shared_zerobyte win_shared_noncontig win_shared_noncontig_put @@ -35,6 +34,15 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) set_target_properties(${file} PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") endforeach() + # These tests use realloc() whose override is currenlty not implemented + foreach(file linked_list_bench_lock_all linked_list_bench_lock_excl) + # linked_list_bench_lock_shr linked_list linked_list_fop linked_list_lockall + add_executable(${file} EXCLUDE_FROM_ALL ${file}.c) + add_dependencies(tests ${file}) + target_link_libraries(${file} simgrid mtest_c) + set_target_properties(${file} PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS} -DSMPI_NO_OVERRIDE_MALLOC") + endforeach() + add_executable(transpose3_shm EXCLUDE_FROM_ALL transpose3.c) add_dependencies(tests transpose3_shm) target_link_libraries(transpose3_shm simgrid mtest_c) diff --git a/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_all.c b/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_all.c index 1587579710..52683c46b0 100644 --- a/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_all.c +++ b/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_all.c @@ -264,6 +264,7 @@ int main(int argc, char **argv) /* Free all the elements in the list */ for (; my_elems_count > 0; my_elems_count--) MPI_Free_mem(my_elems[my_elems_count - 1]); + free(my_elems); MPI_Finalize(); return 0; diff --git a/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_excl.c b/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_excl.c index 1f30b04bcd..b879543b81 100644 --- a/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_excl.c +++ b/teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_excl.c @@ -267,6 +267,7 @@ int main(int argc, char **argv) /* Free all the elements in the list */ for (; my_elems_count > 0; my_elems_count--) MPI_Free_mem(my_elems[my_elems_count - 1]); + free(my_elems); MPI_Finalize(); return 0;