netcdf-c/libdap4
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
..
CMakeLists.txt Add the ability to set some additional curlopt values 2018-08-26 17:04:46 -06:00
d4bytes.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4bytes.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4chunk.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
d4chunk.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4crc32.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
d4curlflags.c Add the ability to set some additional curlopt values 2018-08-26 17:04:46 -06:00
d4curlfunctions.c Add the ability to set some additional curlopt values 2018-08-26 17:04:46 -06:00
d4curlfunctions.h Add the ability to set some additional curlopt values 2018-08-26 17:04:46 -06:00
d4cvt.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4data.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
d4debug.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
d4debug.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4dump.c 1. Keep up to date by merging master 2018-01-16 11:00:09 -07:00
d4file.c re: github issues 2018-10-30 20:48:12 -06:00
d4fix.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
d4http.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
d4http.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4includes.h Fix build on pre-C99 compilers 2017-11-26 01:47:54 +05:30
d4mem.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
d4meta.c re: github issues 2018-10-30 20:48:12 -06:00
d4odom.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
d4odom.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4parser.c re: github issues 2018-10-30 20:48:12 -06:00
d4printer.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4read.c re: github issues 2018-10-30 20:48:12 -06:00
d4read.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4swap.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
d4util.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
d4util.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
d4varx.c re: github issues 2018-10-30 20:48:12 -06:00
ezxml_extra.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
ezxml.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
ezxml.h Follow-up trivial typos 2018-04-26 23:04:01 -04:00
Makefile.am Add the ability to set some additional curlopt values 2018-08-26 17:04:46 -06:00
ncd4.h re: github issues 2018-10-30 20:48:12 -06:00
ncd4dispatch.c Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
ncd4dispatch.h Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
ncd4types.h re: github issues 2018-10-30 20:48:12 -06:00