netcdf-c/ncdap_test
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
..
expected3 Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
expectremote3 Misc. source comment typos 2018-04-26 23:04:01 -04:00
expecttds3
nocacheremote3
special3
testdata3 Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
CMakeLists.txt Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
findtestserver.c.in re: github issues 2018-10-30 20:48:12 -06:00
Makefile.am Remove debug output 2018-10-02 11:43:11 -06:00
run_ncdap_tests.sh
t_auth.c
t_dap3a.c 1. Keep up to date by merging master 2018-01-16 11:00:09 -07:00
t_dap3b.c
t_dap3c.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
t_dap.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
t_misc.c re: github issues 2018-10-30 20:48:12 -06:00
t_ncf330.c
t_srcdir.h Code duplicated; merge failure? 2018-05-18 20:28:51 -06:00
test_cvt.c more warnings 2017-11-30 09:16:29 -07:00
test_environment.c
test_nstride_cached.c This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
test_partvar2.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
test_partvar.c re: github issues 2018-10-30 20:48:12 -06:00
test_vara.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
test_varm3.c re: github issues 2018-10-30 20:48:12 -06:00
testauth.old
testauth.sh
testauth.sh.old
testbasicauth.sh
testcontainerauth.sh
testurl.sh Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
tst_ber.sh getting make -j check working 2017-11-17 10:49:06 -07:00
tst_curlopt.sh Add the ability to set some additional curlopt values 2018-08-26 17:04:46 -06:00
tst_filelists.sh The ncdap_tests were a mess, so I decided to clean them up 2018-03-20 21:31:31 -06:00
tst_fillmismatch.sh Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
tst_formatx.sh getting make -j check working 2017-11-17 10:49:06 -07:00
tst_longremote3.sh The ncdap_tests were a mess, so I decided to clean them up 2018-03-20 21:31:31 -06:00
tst_ncdap3.sh Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
tst_ncdap_shared.sh
tst_ncdap.sh Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
tst_nocache3.sh
tst_remote3.sh Modified tst_remote3.sh to work on OSX. 2018-03-29 18:30:16 -06:00
tst_remote.sh The Jetstream remote test server is now working. 2018-06-26 13:58:45 -06:00
tst_special.sh eliminating test dependencies in ncdap_test 2017-11-26 07:00:17 -07:00
tst_tds.sh eliminating test dependencies in ncdap_test 2017-11-26 07:00:17 -07:00
tst_urls.sh Follow-up trivial typos 2018-04-26 23:04:01 -04:00
tst_utils.sh Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00