Go to file
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
.github Adopted codeowners file from metpy project; this is a technical ownership and is not asserting ownership of code/copyright. Any code that does not have an obvious owner (from the perspective of github) will default to @WardF and @DennisHeimbigner 2018-03-16 14:46:08 -06:00
cmake Fix some cmake syntax errors 2013-09-16 12:16:44 -06:00
conda.recipe Attempting appveyor support. Based on work by @ocefpaf, see https://github.com/Unidata/netcdf-c/pull/347 for more information. 2018-04-24 11:28:22 -06:00
dap4_test Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
debug undid some unnecessary changes 2018-11-02 10:04:06 -06:00
docs Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
examples Merge branch 'master' into nc_mpiio_nc_mpiposix 2018-10-06 13:33:55 -06:00
h5_test Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
hdf4_test Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
include Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
libdap2 Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
libdap4 Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
libdispatch Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
libhdf4 add a missed update to NC_HDF4_open 2018-09-23 01:36:50 -05:00
libhdf5 Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
liblib Use PnetCDF instead of parallel-netcdf to avoid confusion with 2018-09-17 17:18:48 -05:00
libsrc Merge branch 'leak1.dmh' into v4.6.2-release-branch.wif 2018-11-01 12:09:53 -06:00
libsrc4 allocating HDF5-specific group info struct for root group 2018-11-12 09:02:46 -07:00
libsrcp add NC_WRITE to LEGAL_CREATE_FLAGS for PnetCDF dispatcher 2018-10-04 11:53:39 -05:00
nc_test Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
nc_test4 Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
ncdap_test Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
ncdump Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
ncgen Fix more memory leaks in netcdf-c library 2018-11-15 10:00:38 -07:00
ncgen3 more docs, more cleaning 2017-12-04 12:21:14 -07:00
nctest Merge branch 'master' into appveyor.wif 2018-05-14 13:19:17 -06:00
oc2 re: github issues 2018-10-30 20:48:12 -06:00
plugins Fix memory problems when using HDF5 version 1.10.x and later. 2018-10-04 11:37:21 -06:00
.gitignore Added new generated files to .gitignore file. 2018-10-04 15:02:02 -06:00
.travis.yml Updated travis.yml to enable filter testing as part of the travis CI tests. 2018-10-02 17:41:52 -06:00
acinclude.m4 Merge branch 'master' into ejh_cleanup 2018-04-02 18:11:58 -06:00
appveyor.yml Misc changes to appveyor testing. 2018-05-24 13:16:56 -06:00
cmake_uninstall.cmake.in
CMakeInstallation.cmake Changed dependencies for debian package builds to remove development packages, when possible. 2014-12-15 22:22:09 +00:00
CMakeLists.txt Merge branch 'leak1.dmh' into v4.6.2-release-branch.wif 2018-11-01 12:09:53 -06:00
CODE_OF_CONDUCT.md Updated email in code of conduct. 2018-03-16 14:56:08 -06:00
COMPILE.cmake.txt Merging from CMake branch in preparation for 4.3.0 release. 2013-04-29 20:15:57 +00:00
config.h.cmake.in Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
config.h.cmake.in.old-works c: remove __CHAR_UNSIGNED__ 2018-02-14 17:24:49 -05:00
configure.ac fixed dap configure issue 2018-11-09 08:45:27 -07:00
CONTRIBUTING.md Put CONTRIBUTING.md back in top level of repository. 2016-02-24 10:55:56 -07:00
COPYRIGHT Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
CTestConfig.cmake.in Cleaning up ctest site identification. 2015-02-02 15:14:22 -07:00
CTestCustom.cmake Reduced default warning number to accomodate bandwidth limitations on hosted CDash. 2013-09-16 15:21:11 -06:00
dods.m4 Misc. source comment typos 2018-04-26 23:04:01 -04:00
FixBundle.cmake.in
INSTALL.md More replacement of "parallel-netcdf" with "PnetCDF". 2018-09-20 11:45:25 -05:00
lib_flags.am 1. Keep up to date by merging master 2018-01-16 11:00:09 -07:00
libnetcdf.settings.in Use PnetCDF instead of parallel-netcdf to avoid confusion with 2018-09-17 17:18:48 -05:00
Makefile.am Use PnetCDF instead of parallel-netcdf to avoid confusion with 2018-09-17 17:18:48 -05:00
mclean Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
nc-config.cmake.in add missing option --has_parallel4 2018-10-02 01:58:21 -05:00
nc-config.in add missing option --has_parallel4 2018-10-02 01:58:21 -05:00
netcdf.pc.in
netCDFConfig.cmake.in Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
PostInstall.cmake Reorganized postinstall scripts. 2014-11-18 12:52:41 -07:00
postinstall.sh.in Bumped experimental fortran autoinstall script to 4.4.4 2018-09-14 15:56:28 -06:00
README.md Corrected some dead links in README. 2016-05-13 09:29:36 -06:00
RELEASE_NOTES.md Triggering re-run of TravisCI 2018-11-12 16:06:50 -07:00
test_common.in Corrected typo in test. 2018-02-28 13:40:50 -07:00
test_prog.c
test-driver-verbose The Jetstream remote test server is now working. 2018-06-26 13:58:45 -06:00
wjna Backadded the fix of Jira-228 2014-06-13 13:41:11 -06:00

Unidata NetCDF

Build Status Coverity Scan Build Status

About

The Unidata network Common Data Form (netCDF) is an interface for scientific data access and a freely-distributed software library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data. The current netCDF software provides C interfaces for applications and data. Separate software distributions available from Unidata provide Java, Fortran, Python, and C++ interfaces. They have been tested on various common platforms.

Properties

NetCDF files are self-describing, network-transparent, directly accessible, and extendible. Self-describing means that a netCDF file includes information about the data it contains. Network-transparent means that a netCDF file is represented in a form that can be accessed by computers with different ways of storing integers, characters, and floating-point numbers. Direct-access means that a small subset of a large dataset may be accessed efficiently, without first reading through all the preceding data. Extendible means that data can be appended to a netCDF dataset without copying it or redefining its structure.

Use

NetCDF is useful for supporting access to diverse kinds of scientific data in heterogeneous networking environments and for writing application software that does not depend on application-specific formats. For information about a variety of analysis and display packages that have been developed to analyze and display data in netCDF form, see

More information

For more information about netCDF, see

Latest releases

You can obtain a copy of the latest released version of netCDF software for various languages:

Copyright and licensing information can be found here, as well as in the COPYRIGHT file accompanying the software

Installation

To install the netCDF-C software, please see the file INSTALL in the netCDF-C distribution, or the (usually more up-to-date) document:

Documentation

A language-independent User's Guide for netCDF, and some other language-specific user-level documents are available from:

A mailing list, netcdfgroup@unidata.ucar.edu, exists for discussion of the netCDF interface and announcements about netCDF bugs, fixes, and enhancements. For information about how to subscribe, see the URL

Feedback

We appreciate feedback from users of this package. Please send comments, suggestions, and bug reports to support-netcdf@unidata.ucar.edu.