|
From: Paul F. <pj...@wa...> - 2024-10-27 15:34:45
|
On 26-10-24 13:36, Daniel Feenberg wrote: > > > This is very disappointing. Such moves may be frequent in other > languages, but I don't see it happening to much in my Fortran 95 code. I > suppose if subroutine arguments are copy-in/copy-out, that would be a > source of spurious messages, as could code in libgfortran,but Valgrind > typically has the source and could drop those messages. > > I did eventually locate the problem in my code, by adding a large number > of write statements scattered thoughout the code, and noting the > earliest one to trigger Valgrind. I think that you grossly underestimate how much copying of uninitialized memory goes on. Any data structure that has a hole or padding thjat gets copied means there is an uninitialized read. Also fields that are intentionally unused, which is quite common with large union based data structures. This might be viable with a client request that only turns on the instrumentation for a limited part of the code. Also note that memory sanitizer also does the same thing as memcheck. A+ Paul |