Fix some errors find by Address Sanitizer
Description AddressSanitizer detected some errors which I've fixed here:
-
mpp_domain_misc:mpp_sendis non-blocking operation so,send_buffermust be alive at least until sync point. (Closes #1803) -
mpp_utils_mpi: in-place writing may give errors (not sure that it really happens here, but anyway) -
test_diag_update_buffeer:-fdefault-real-8generates1.0e-5asreal(8). Then,real(8)constructor ofmissvalueis called while it isreal(4). So, 4 extra bytes were written. (Closes #1805) -
test_xgrid:put_to_xgridkept address of local/temporary variables generated byarray + xexpressions. Now, lifetimes ofarray + xarrays are expanded. That is why after #1778 there is a lot failures of CI. (Closes #1804)
How Has This Been Tested? Tested in CI with AddressSanitizer. Unfortunately, not all Address Sanitizer errors are fixed.
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] Any dependent changes have been merged and published in downstream modules
- [x] New check tests, if applicable, are included
- [x]
make distcheckpasses
@foxtran Can you open an issue that describes what you are fixing and why and link it to this PR. It helps us with tracking.
Also, just out of curiosity, do you have a use case for FMS that we don't know about. We are interested to hear how you are using FMS.
We are interested to hear how you are using FMS
I'm playing with flang frontend :-)
@thomas-robinson, I filed 2 of 4 bugs. Ping me, please, tomorrow, if I will not put other 2 until tomorrow.