netcdf-c/libdispatch
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
..
u Resolves Github issue https://github.com/Unidata/netcdf-c/issues/349. 2017-02-16 14:27:54 -07:00
CMakeLists.txt re: github issues 2018-10-30 20:48:12 -06:00
crc32.c The file libdispatch/crc32.c was apparently causing 2018-04-02 13:19:58 -06:00
crc32.h This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
datt.c added return code documentation for dtype.c and datt.c 2017-11-15 04:08:58 -07:00
dattget.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
dattinq.c fixed doxygen warnings in dattinq.c 2017-11-14 11:22:48 -07:00
dattput.c fixed docs 2018-08-24 14:15:59 -06:00
dauth.c Fix the NC_INMEMORY code to work in all cases with HDF5 1.10. 2018-09-04 11:27:47 -06:00
daux.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
dcompound.c Fixed netcdf-c issue #30 (on github) related to cmake-generated nc-config script. 2014-03-11 13:07:04 -06:00
dcopy.c more docs 2017-12-04 13:11:54 -07:00
ddim.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
ddispatch.c Code duplicated; merge failure? 2018-05-18 20:28:51 -06:00
defcheck.c Modified a number of tests 2014-10-04 15:59:16 -06:00
denum.c
derror.c introduce error code NC_EPNETCDF for errors at PnetCDF level 2018-07-29 15:33:08 -05:00
dfile.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
dfilter.c re: GH Issue https://github.com/Unidata/netcdf-c/issues/806 2018-01-25 13:51:42 -07:00
dgroup.c Filled in short description for group-related functions in support of https://github.com/Unidata/netcdf-c/issues/277 full documentation still pending. 2016-07-11 16:55:30 -06:00
dinternal.c Add szip support via libaec 2017-08-27 13:35:20 -06:00
dnotnc3.c added merged HDF4 changes 2018-04-04 14:11:44 -06:00
dnotnc4.c added merged HDF4 changes 2018-04-04 14:11:44 -06:00
doffsets.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
dopaque.c
dparallel.c revise comments about collective I/O mode 2018-10-02 01:19:44 -05:00
drc.c Corrected VS2010 compilation issue in support of https://github.com/Unidata/netcdf-c/issues/1184 . Solution provided by Mark Rivers on the NetCDF mailing list. 2018-11-08 12:37:03 -07:00
dreadonly.c Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
dstring.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
dtype.c further test development, added documentation for uncommitted user-defined types, fixed check of return value 2018-01-18 06:47:50 -07:00
dutf8.c Fix bug in utf8 -> utf16 conversion with ncgen -l java. 2018-10-31 21:10:51 -06:00
dutil.c Revert/Improve nc_create + NC_DISKLESS behavior 2018-10-10 13:32:17 -06:00
dv2i.c Replace quotes when including system includes, in support of https://github.com/Unidata/netcdf-c/issues/928 2018-04-18 10:51:03 -06:00
dvar.c re: github issues 2018-10-30 20:48:12 -06:00
dvarget.c converting NULL checking of put functions 2018-08-14 09:21:45 -06:00
dvarinq.c Fix szip filter handling code and correspondingtests 2018-09-15 15:21:51 -06:00
dvarput.c converting NULL checking of put functions 2018-08-14 09:21:45 -06:00
dvlen.c Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
dwinpath.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
heap Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
json.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
Makefile.am re: github issues 2018-10-30 20:48:12 -06:00
nc.c return NC_ENOTBUILT when CDF5 is not enabled but NC_64BIT_DATA is used 2018-09-17 17:18:48 -05:00
ncbytes.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
nchashmap.c Corrected VS2010 compilation issue in support of https://github.com/Unidata/netcdf-c/issues/1184 . Solution provided by Mark Rivers on the NetCDF mailing list. 2018-11-08 12:37:03 -07:00
nclist.c re: github issues 2018-10-30 20:48:12 -06:00
nclistmgr.c fix issue 791: validate ncid for classic files 2018-01-25 00:03:19 -06:00
nclog.c Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch 2018-10-01 15:51:43 -06:00
ncsettings.hdr Add ability to programmatically 2014-08-29 14:51:14 -06:00
nctime.c Solve issue https://github.com/Unidata/netcdf-c/issues/359 2017-07-24 18:59:16 -06:00
ncuri.c fixed clang warning in ncuri.c 2018-07-06 06:52:02 -06:00
netcdf.m4 In preparation for adding dap4 support, I have cleaned up 2014-03-24 14:02:52 -06:00
stubdef.c
test_ncuri.c Error in ncuri in handling user:pwd@ in url 2017-07-05 14:39:23 -06:00
test_pathcvt.c found a few more easy warnings 2017-11-09 06:39:43 -07:00
u8.c Resolves Github issue https://github.com/Unidata/netcdf-c/issues/349. 2017-02-16 14:27:54 -07:00
u8.h Resolves Github issue https://github.com/Unidata/netcdf-c/issues/349. 2017-02-16 14:27:54 -07:00
utf8proc_data.c Refactored additional constants. 2017-02-28 11:15:51 -07:00
utf8proc.c Fix build on pre-C99 compilers 2017-11-26 01:47:54 +05:30
utf8proc.h Use refactored variable names introduced by 773fe807 2017-11-26 01:47:46 +05:30