fortran-lang / minpack

Modernized Minpack: for solving nonlinear equations and nonlinear least squares problems
https://fortran-lang.github.io/minpack/
Other
94 stars 20 forks source link

Valgrind reports errors for tests #5

Open Nicholaswogan opened 2 years ago

Nicholaswogan commented 2 years ago

Valgrind says that some of the tests have errors. For example test_hybrd

==7124== 
==7124== HEAP SUMMARY:
==7124==     in use at exit: 0 bytes in 0 blocks
==7124==   total heap usage: 27 allocs, 27 frees, 26,772 bytes allocated
==7124== 
==7124== All heap blocks were freed -- no leaks are possible
==7124== 
==7124== Use --track-origins=yes to see where uninitialised values come from
==7124== For lists of detected and suppressed errors, rerun with: -s
==7124== ERROR SUMMARY: 88315 errors from 436 contexts (suppressed: 0 from 0)

example error:

==7124== Conditional jump or move depends on uninitialised value(s)
==7124==    at 0x116888: __minpack_module_MOD_enorm (minpack.f90:392)
==7124==    by 0x10AC6F: MAIN__ (test_hybrd.f90:66)
==7124==    by 0x10B003: main (test_hybrd.f90:3)
jacobwilliams commented 2 years ago

can we get valgrind in the CI?

awvwgk commented 2 years ago

Sure, its possible to setup in the CI, but what is the value? Can we define a CI failure based on the valgrind report?

I usually use valgrind for debugging the memory safety of my C code, but running locally on a specific test or executable.