Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Wellspring back into development branch #2560

Merged
merged 22 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7559b86
Restore release date for 4.9.1 RC1 in release notes.
WardF Nov 17, 2022
19b8ae4
Added target release date for RC2.
WardF Nov 17, 2022
087d3b6
Supported headers for hdf4 are not installed in actions, and there do…
WardF Nov 18, 2022
74b4aae
Update release date.
WardF Nov 18, 2022
573e892
DAP4 is back on for cmake-based builds.
WardF Nov 21, 2022
a03bb5e
Fix infinite loop in file inferencing
DennisHeimbigner Dec 18, 2022
9226b52
Add an old static file.
WardF Dec 19, 2022
dd99d60
Added another old static html page in preparation for updating.
WardF Dec 19, 2022
c228426
Fix a logic error re: DAP4 tests, when DAP4 is specified, but hdf5/ne…
WardF Dec 19, 2022
a71d77b
Merge branch 'restore_old_doc.wif' of https://github.com/WardF/netcdf…
WardF Dec 20, 2022
435f16b
Merge branch 'loop.dmh' of https://github.com/DennisHeimbigner/netcdf…
WardF Jan 4, 2023
9ea2739
Added S3 status to libnetcdf.settings, turned byterange on by default.
WardF Jan 9, 2023
ecd48ae
Cleaning up NCZARR_S3 summary, turning on byterange by default.
WardF Jan 9, 2023
19a1f9e
Add libcurl-dev to cygwin github actions
WardF Jan 9, 2023
e02f678
Correct libcurl development package.
WardF Jan 9, 2023
bd03412
Add libiconv-devel to cygwin CI
WardF Jan 9, 2023
394cf64
Correct version string change that should not have ended up in this b…
WardF Jan 9, 2023
3e35a10
Correct logic for running DAP4 tests when HDF5 is not enabled.
WardF Jan 10, 2023
4c27c59
Update whitespace.
WardF Jan 10, 2023
341a43b
Correct lingering merge issue.
WardF Jan 10, 2023
0006545
Merging https://github.com/Unidata/netcdf-c/pull/2583 manually into t…
WardF Jan 10, 2023
b67583f
Fix a doxygen warning-treated-as-error
WardF Jan 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix infinite loop in file inferencing
re: Issue #2573

The file type inferencer in libdispatch/dinference.c has a simple
forward inference mechanism so that the occurrence of certain mode
values in a URL fragment implies inclusion of additional mode values.
This kind of inference is notorious for leading to cycles if not
careful. Unfortunately, this occurred in the one in dinference.c.

This was fixed by providing a more complicated, but more reliable inference
mechanism.

## Misc. Other Changes
* Found and fixed a couple of memory leaks.
* There is a recent problem in building HDF4 support on github actions. Fixed by using the internal HDF4 xdr capability.
* Some filter-related code was not being properly ifdef'd with ENABLE_NCZARRA_FILTERS.
  • Loading branch information
DennisHeimbigner committed Dec 18, 2022
commit a03bb5e60165b11be11f8c1e8e492a274a742011
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name: Run macOS-based netCDF Tests


on: [pull_request, workflow_dispatch]
on: [pull_request,workflow_dispatch]

jobs:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run_tests_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: Run Ubuntu/Linux netCDF Tests

on: [pull_request, workflow_dispatch]
on: [pull_request,workflow_dispatch]

jobs:

Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.15/src/hdf-4.2.15.tar.bz2
tar -jxf hdf-4.2.15.tar.bz2
pushd hdf-4.2.15
./configure --prefix=${HOME}/environments/${{ matrix.hdf5 }} --disable-static --enable-shared --disable-fortran --disable-netcdf --with-szlib
./configure --prefix=${HOME}/environments/${{ matrix.hdf5 }} --disable-static --enable-shared --disable-fortran --disable-netcdf --with-szlib --enable-hdf4-xdr
make -j
make install -j
popd
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.15/src/hdf-4.2.15.tar.bz2
tar -jxf hdf-4.2.15.tar.bz2
pushd hdf-4.2.15
CC=mpicc ./configure --prefix=${HOME}/environments/${{ matrix.hdf5 }} --disable-static --enable-shared --disable-fortran --disable-netcdf --with-szlib --enable-parallel
CC=mpicc ./configure --prefix=${HOME}/environments/${{ matrix.hdf5 }} --disable-static --enable-shared --disable-fortran --disable-netcdf --with-szlib --enable-parallel --enable-hdf4-xdr
make -j
make install -j
popd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_win_cygwin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run Cygwin-based tests

on: [pull_request, workflow_dispatch]
on: [pull_request,workflow_dispatch]

env:
SHELLOPTS: igncr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_win_mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Run MSYS2, MinGW64-based Tests
env:
CPPFLAGS: "-D_BSD_SOURCE"

on: [pull_request, workflow_dispatch]
on: [pull_request,workflow_dispatch]

jobs:

Expand Down
23 changes: 9 additions & 14 deletions libdispatch/dfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,19 +1839,16 @@ NC_create(const char *path0, int cmode, size_t initialsz,

TRACE(nc_create);
if(path0 == NULL)
return NC_EINVAL;
{stat = NC_EINVAL; goto done;}

/* Check mode flag for sanity. */
if ((stat = check_create_mode(cmode)))
return stat;
if ((stat = check_create_mode(cmode))) goto done;

/* Initialize the library. The available dispatch tables
* will depend on how netCDF was built
* (with/without netCDF-4, DAP, CDMREMOTE). */
if(!NC_initialized)
{
if ((stat = nc_initialize()))
return stat;
if(!NC_initialized) {
if ((stat = nc_initialize())) goto done;
}

{
Expand All @@ -1863,10 +1860,7 @@ NC_create(const char *path0, int cmode, size_t initialsz,

memset(&model,0,sizeof(model));
newpath = NULL;
if((stat = NC_infermodel(path,&cmode,1,useparallel,NULL,&model,&newpath))) {
nullfree(newpath);
goto done;
}
if((stat = NC_infermodel(path,&cmode,1,useparallel,NULL,&model,&newpath))) goto done;
if(newpath) {
nullfree(path);
path = newpath;
Expand Down Expand Up @@ -1918,7 +1912,7 @@ NC_create(const char *path0, int cmode, size_t initialsz,
dispatcher = NC3_dispatch_table;
break;
default:
return NC_ENOTNC;
{stat = NC_ENOTNC; goto done;}
}

/* Create the NC* instance and insert its dispatcher and model */
Expand All @@ -1937,6 +1931,7 @@ NC_create(const char *path0, int cmode, size_t initialsz,
}
done:
nullfree(path);
nullfree(newpath);
return stat;
}

Expand Down Expand Up @@ -1980,12 +1975,12 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp,
TRACE(nc_open);
if(!NC_initialized) {
stat = nc_initialize();
if(stat) return stat;
if(stat) goto done;
}

/* Check inputs. */
if (!path0)
return NC_EINVAL;
{stat = NC_EINVAL; goto done;}

/* Capture the inmemory related flags */
mmap = ((omode & NC_MMAP) == NC_MMAP);
Expand Down
Loading