Open sunpho84 opened 2 years ago
Alternatively one could edit invert_quda.h like this:
if(madwf_param.madwf_param_load)
strcpy(madwf_param.madwf_param_infile, param.madwf_param_infile);
Well-spotted! Some of the DW stuff is new, so it may well be that new issues have been introduced recently. When the ndeg-twisted-clover
stuff was merged, "my" Wilson two-flavour operator was also replaced in favour of a re-use of the 4dim-part of the DW operator (which makes total sense). It may be that this has led to a behavioural difference between the feature/ndeg-twisted-clover
branch (which was tested quite thoroughly) and the resulting code merged into develop
.
Initialization of madwf_param_infile and madwf_param_outfile #1246
https://github.com/sunpho84/quda/blob/5431b168b09343503d0d676425069dc895879c92/include/invert_quda.h#L377-L378
copy some string around. Problem is, the strings are not guaranteed to be initialized, in facts the initialization is missing from
check_params.h
https://github.com/sunpho84/quda/blob/5431b168b09343503d0d676425069dc895879c92/lib/check_params.hso the strcpy of the nonterminated string can do supernasty things, as manifested by valgrind in a tmLQCD run
@Marcogarofalo and @kostrzewa I attach you to the topic
I believe the members should be initialized, with Marco we were thinking to something in the line of
What do you think?