jacobwilliams / json-fortran

A Modern Fortran JSON API
https://jacobwilliams.github.io/json-fortran/
Other
333 stars 82 forks source link

add valgrind to CI #563

Closed jacobwilliams closed 2 months ago

jacobwilliams commented 2 months ago

Maybe run valgrind in the CI to check for memory leaks.

jacobwilliams commented 2 months ago

The following tests are showing memory leaks:

jacobwilliams commented 2 months ago

For case 12, this is the memory leak:

my_file = json_file(root,verbose=.true.,real_format='G')

Not sure if it's the assignment or the json_file interface or some combination of both that is causing it.

Is it a real bug, or just a gfortran bug with not calling the finalizers correctly?

Assignments like my_file2 = my_file don't seem to cause memory leaks.

jacobwilliams commented 2 months ago

All of them (except 50) have this same issue.