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 Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
nocacheremote3 Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
special3 Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
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 Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
t_auth.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
t_dap3a.c 1. Keep up to date by merging master 2018-01-16 11:00:09 -07:00
t_dap3b.c Fixed the following Jira minor bugs: 2011-05-12 17:51:32 +00:00
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 merge-squash 2015-08-15 16:26:35 -06:00
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 Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
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 Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
testauth.sh Error in ncuri in handling user:pwd@ in url 2017-07-05 14:39:23 -06:00
testauth.sh.old Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
testbasicauth.sh ckp 2017-07-21 13:54:09 -06:00
testcontainerauth.sh ckp 2017-07-21 13:54:09 -06:00
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 turn of extra debug 2017-07-15 20:21:24 -06:00
tst_ncdap.sh Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
tst_nocache3.sh Modified ncdap_test to allow a different method 2017-01-18 21:46:47 -07:00
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