netcdf-c/libdap2
Dennis Heimbigner 751300ec59 Fix more memory leaks in netcdf-c library
This is a follow up to PR https://github.com/Unidata/netcdf-c/pull/1173

Sorry that it is so big, but leak suppression can be complex.

This PR fixes all remaining memory leaks -- as determined by
-fsanitize=address, and with the exceptions noted below.

Unfortunately. there remains a significant leak that I cannot
solve. It involves vlens, and it is unclear if the leak is
occurring in the netcdf-c library or the HDF5 library.

I have added a check_PROGRAM to the ncdump directory to show the
problem.  The program is called tst_vlen_demo.c To exercise it,
build the netcdf library with -fsanitize=address enabled. Then
go into ncdump and do a "make clean check".  This should build
tst_vlen_demo without actually executing it.  Then do the
command "./tst_vlen_demo" to see the output of the memory
checker.  Note the the lost malloc is deep in the HDF5 library
(in H5Tvlen.c).

I am temporarily working around this error in the following way.
1. I modified several test scripts to not execute known vlen tests
   that fail as described above.
2. Added an environment variable called NC_VLEN_NOTEST.
   If set, then those specific tests are suppressed.

This should mean that the --disable-utilities option to
./configure should not need to be set to get a memory leak clean
build.  This should allow for detection of any new leaks.

Note: I used an environment variable rather than a ./configure
option to control the vlen tests. This is because it is
temporary (I hope) and because it is a bit tricky for shell
scripts to access ./configure options.

Finally, as before, this only been tested with netcdf-4 and hdf5 support.
2018-11-15 10:00:38 -07:00
..
obsolete Follow-up trivial typos 2018-04-26 23:04:01 -04:00
cache.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
cdf.c Code duplicated; merge failure? 2018-05-18 20:28:51 -06:00
CMakeLists.txt Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
common.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
constraints.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
constraints.h Sync with oc project. 2014-12-24 10:22:47 -07:00
cvt 2011-04-17 18:56:10 +00:00
dapattr.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
dapcvt.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
dapdebug.c The files libdispatch/dwinpath.c and include/ncwinpath.h 2017-07-13 10:40:07 -06:00
dapdebug.h Turn off debug noise 2017-07-14 15:32:17 -06:00
dapdump.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
dapdump.h Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
dapincludes.h Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
dapnc.h In preparation for adding dap4 support, I have cleaned up 2014-03-24 14:02:52 -06:00
dapodom.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
dapodom.h In preparation for adding dap4 support, I have cleaned up 2014-03-24 14:02:52 -06:00
daputil.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
daputil.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
dce.y 2011-04-17 18:56:10 +00:00
dceconstraints.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
dceconstraints.h In preparation for adding dap4 support, I have cleaned up 2014-03-24 14:02:52 -06:00
dcelex.c Addressed a memory leak issue identified by static analysis. 2014-10-01 16:18:00 -06:00
dceparse.c re: github issues 2018-10-30 20:48:12 -06:00
dceparselex.h A couple of people have reported that 2016-07-11 14:11:20 -06:00
dcetab.c A netcdfgroup email 2016-06-24 15:28:50 -06:00
dcetab.h A netcdfgroup email 2016-06-24 15:28:50 -06:00
env ckp 2017-03-11 15:20:20 -07:00
getvara.c This is the second step in refactoring the libsrc4 code. 2018-02-24 20:36:24 -07:00
getvara.h In preparation for adding dap4 support, I have cleaned up 2014-03-24 14:02:52 -06:00
main.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
Makefile.am Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
nccommon.h Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
ncd2dispatch.c re: github issues 2018-10-30 20:48:12 -06:00
ncd2dispatch.h Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
ncdap.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
ncdapa.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
ncdaperr.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
test1.sh move from oc1.0 to oc2.0; create new dir oc2 2012-07-31 20:34:13 +00:00
test_vara.c Fix the NC_INMEMORY code to work in all cases with HDF5 1.10. 2018-09-04 11:27:47 -06:00
todo completely rewritten constraint system 2011-11-14 04:20:19 +00:00
translation.html 2011-04-17 18:56:10 +00:00