Skip to content
Commits on Source (2)
gmt (5.4.5+dfsg-2) UNRELEASED; urgency=medium
gmt (5.4.5+dfsg-2) unstable; urgency=medium
* Remove package name from lintian overrides.
* Add upstream patch to fix segfault with NetCDF 4.6.3.
(closes: #929264)
-- Bas Couwenberg <sebastic@debian.org> Fri, 15 Mar 2019 15:22:04 +0100
-- Bas Couwenberg <sebastic@debian.org> Tue, 21 May 2019 09:39:24 +0200
gmt (5.4.5+dfsg-1) unstable; urgency=medium
......
Description: Avoid passing stride = NULL to io_nc_varm_grdfloat.
netCDF introduced a bug in 4.6.2 and fixed it in 4.6.3. However,
macports just now released 4.6.2 and GMT scripts involving netcdf grids
would in some cases crash do to the bug. A fix is to not pass a stride
of NULL (which was meant that netCDF would create unit strides - but
that is the bug) and instead pass thje unit strides directly. Closes # 512.
Author: Paul Wessel <pwessel@hawaii.edu>
Origin: https://github.com/GenericMappingTools/gmt/commit/1a5a11a29eaa242258d088fdf2690c0452986988
Bug: https://github.com/GenericMappingTools/gmt/issues/512
Bug-Debian: https://bugs.debian.org/
--- a/src/gmt_nc.c
+++ b/src/gmt_nc.c
@@ -177,6 +177,7 @@ GMT_LOCAL int gmtnc_io_nc_grid (struct G
size_t start[5] = {0,0,0,0,0}, count[5] = {1,1,1,1,1};
size_t n_contiguous_chunk_rows = 0; /* that are processed at once, 0 = all */
ptrdiff_t imap[5] = {1,1,1,1,1}; /* mapping between dims of netCDF and in-memory grid */
+ const ptrdiff_t onestride[5] = {1,1,1,1,1}; /* Passing this instead of NULL bypasses netCDF bug in 4.6.2 */
/* catch illegal io_mode in debug */
assert (io_mode == k_put_netcdf || io_mode == k_get_netcdf);
@@ -223,7 +224,7 @@ GMT_LOCAL int gmtnc_io_nc_grid (struct G
#endif
/* get/put chunked rows */
if (stride)
- status = io_nc_varm_float (header->ncid, header->z_id, start, count, NULL, imap, grid, io_mode);
+ status = io_nc_varm_float (header->ncid, header->z_id, start, count, onestride, imap, grid, io_mode);
else
status = io_nc_vara_float (header->ncid, header->z_id, start, count, grid, io_mode);
@@ -244,7 +245,7 @@ GMT_LOCAL int gmtnc_io_nc_grid (struct G
++row_num, start[yx_dim[0]], count[yx_dim[0]]);
#endif
if (stride)
- status = io_nc_varm_float (header->ncid, header->z_id, start, count, NULL, imap, grid, io_mode);
+ status = io_nc_varm_float (header->ncid, header->z_id, start, count, onestride, imap, grid, io_mode);
else
status = io_nc_vara_float (header->ncid, header->z_id, start, count, grid, io_mode);
}
@@ -254,7 +255,7 @@ GMT_LOCAL int gmtnc_io_nc_grid (struct G
count[yx_dim[0]] = height_t;
count[yx_dim[1]] = width_t;
if (stride)
- status = io_nc_varm_float (header->ncid, header->z_id, start, count, NULL, imap, grid, io_mode);
+ status = io_nc_varm_float (header->ncid, header->z_id, start, count, onestride, imap, grid, io_mode);
else
status = io_nc_vara_float (header->ncid, header->z_id, start, count, grid, io_mode);
}
disable-triangle.patch
manpage-section.patch
spelling-errors.patch
0001-Same-fix-as-for-masters-but-for-5.4-542.patch