[Git][debian-gis-team/gmt][master] 2 commits: Add upstream patch to fix segfault with NetCDF 4.6.3. (closes: #929264)

Bas Couwenberg gitlab at salsa.debian.org
Tue May 21 09:08:35 BST 2019



Bas Couwenberg pushed to branch master at Debian GIS Project / gmt


Commits:
a00631a7 by Bas Couwenberg at 2019-05-21T07:12:19Z
Add upstream patch to fix segfault with NetCDF 4.6.3. (closes: #929264)

- - - - -
ca3a0dad by Bas Couwenberg at 2019-05-21T07:39:32Z
Set distribution to unstable.

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0001-Same-fix-as-for-masters-but-for-5.4-542.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,10 @@
-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 at debian.org>  Fri, 15 Mar 2019 15:22:04 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 21 May 2019 09:39:24 +0200
 
 gmt (5.4.5+dfsg-1) unstable; urgency=medium
 


=====================================
debian/patches/0001-Same-fix-as-for-masters-but-for-5.4-542.patch
=====================================
@@ -0,0 +1,48 @@
+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 at 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);
+ 	}


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
 disable-triangle.patch
 manpage-section.patch
 spelling-errors.patch
+0001-Same-fix-as-for-masters-but-for-5.4-542.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/gmt/compare/5f73f5c2a21e9dfccb9abe37e1f4d6be907509ad...ca3a0dad68be91584e718eb59f89ec8b4741a652

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/gmt/compare/5f73f5c2a21e9dfccb9abe37e1f4d6be907509ad...ca3a0dad68be91584e718eb59f89ec8b4741a652
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190521/d1de5810/attachment-0001.html>


More information about the Pkg-grass-devel mailing list