Closed ax3l closed 5 years ago
Ah no, it's on our side. We are passing a temporary C++ sstream as a string as a c pointer. One temporary too much, sorry for the noise!
(The non-copy modification in ah no, just a pointer re-assignment)a2s_text_to_name_value_pairs
still looks a bit odd, but maybe I miss something there.
The
parameters *
argument inadios_select_method
causes a heap-use-after-free when run in parallel withMPI_AGGREGATE
.When used as:
Tested with ADIOS 1.13.1,
mpirun -np 2
.Detectable, e.g. with
clang-6 -fsantize-address
andLikely root issue:
The parameters are passed to
adios_common_select_method_by_group_id
which evaluates the params inget_and_preprocess_params
. That in turn callsa2s_text_to_name_value_pairs
, where the original pointer is aliased initem
which is then modified instead of its copy here.cc @pnorbert