Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Add upstream patches to fix test failure with GCC 8.x.
· 5d3855d7
Bas Couwenberg
authored
Aug 11, 2018
5d3855d7
Set distribution to unstable.
· e7cf9643
Bas Couwenberg
authored
Aug 11, 2018
e7cf9643
Hide whitespace changes
Inline
Side-by-side
debian/changelog
View file @
e7cf9643
proj (5.1.0-2)
UNRELEASED
; urgency=medium
proj (5.1.0-2)
unstable
; urgency=medium
* Bump Standards-Version to 4.2.0, no changes.
* Use filter instead of findstring to prevent partial matches.
* Update lintian override for embedded-javascript-library.
* Drop autopkgtest to test installability.
* Add lintian override for testsuite-autopkgtest-missing.
* Add upstream patches to fix test failure with GCC 8.x.
-- Bas Couwenberg <sebastic@debian.org>
Thu, 05 Jul 2018 10:56:56
+0200
-- Bas Couwenberg <sebastic@debian.org>
Sat, 11 Aug 2018 15:47:39
+0200
proj (5.1.0-1) unstable; urgency=medium
...
...
debian/patches/0001-4D-API_cs2cs-style.gie-rewrite-test-to-not-rely-on-p.patch
0 → 100644
View file @
e7cf9643
Description: 4D-API_cs2cs-style.gie: rewrite test to not rely on presence of
'conus' grid (we should have a way to state that some grids must be present)
(refs #872)
Author: Even Rouault <even.rouault@spatialys.com>
Origin: https://github.com/OSGeo/proj.4/commit/666efb98088c007fc297e8cbd0648367bd62c014
--- a/test/gie/4D-API_cs2cs-style.gie
+++ b/test/gie/4D-API_cs2cs-style.gie
@@ -235,12 +235,12 @@
Test that +datum parameters are handled
See #872 for details.
-------------------------------------------------------------------------------
operation +proj=pipeline
- +step +proj=longlat +datum=NAD27 +inv
+ +step +proj=longlat +datum=GGRS87 +inv
+step +proj=longlat +datum=WGS84
-------------------------------------------------------------------------------
tolerance 20 cm
-accept -100 40 0
-expect -100.0004058367 40.0000058947 0.0000
+accept 23.7275 37.9838 0
+expect 23.729194873180 37.986398897578 31.289740102
-------------------------------------------------------------------------------
debian/patches/0001-Fix-wrong-behaviour-of-torad_coord-with-gcc-8.1-O2-f.patch
0 → 100644
View file @
e7cf9643
Description: Fix wrong behaviour of torad_coord() with gcc 8.1 -O2 (fixes #1084
torad_coord() of gie.c has this sequence:
```
if( cond )
axis = l->param + strlen ("axis=");
n = strlen (axis);
```
.
When the if branch is evaluated, n is always zero
even if on inspection axis is non empty
.
The reason is that the struct ARG_list which is the
type of l use a variable-length array for the param member
.
struct ARG_list {
paralist *next;
char used;
char param[1];
};
.
But this is not a proper way of declaring it, and
gcc 8 has apparently optimizations to detect that l->param + 5
points out of the array, hence it optimizes strlen() to 0.
.
Reported as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86914
.
According to https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html,
the proper way of declaring such arrays is to use [0]
Author: Even Rouault <even.rouault@spatialys.com>
Origin: https://github.com/OSGeo/proj.4/commit/143b4d3f64e0828a3b03dd9ed997dd5412c2b25a
Bug: https://github.com/OSGeo/proj.4/issues/1084
--- a/src/pj_param.c
+++ b/src/pj_param.c
@@ -42,7 +42,7 @@
paralist *pj_mkparam_ws (char *str) {
}
/* Use calloc to automagically 0-terminate the copy */
- newitem = (paralist *) pj_calloc (1, sizeof(paralist) + len);
+ newitem = (paralist *) pj_calloc (1, sizeof(paralist) + len + 1);
if (0==newitem)
return 0;
memmove(newitem->param, str, len);
--- a/src/projects.h
+++ b/src/projects.h
@@ -458,7 +458,12 @@
struct PJconsts {
struct ARG_list {
paralist *next;
char used;
- char param[1];
+#ifdef __GNUC__
+ char param[0]; /* variable-length member */
+ /* Safer to use [0] for gcc. See https://github.com/OSGeo/proj.4/pull/1087 */
+#else
+ char param[1]; /* variable-length member */
+#endif
};
debian/patches/0001-projects.h-use-param-variable-length-member-syntax-w.patch
0 → 100644
View file @
e7cf9643
Description: projects.h: use param[] variable-length member syntax with GCC >= 8
to fix optimization issue with gcc 8.2 (fixes #1084)
Author: Even Rouault <even.rouault@spatialys.com>
Origin: https://github.com/OSGeo/proj.4/commit/edfa2981326ea4a476d420436323d0fb37a4efab
Bug: https://github.com/OSGeo/proj.4/issues/1084
--- a/src/projects.h
+++ b/src/projects.h
@@ -458,9 +458,10 @@
struct PJconsts {
struct ARG_list {
paralist *next;
char used;
-#ifdef __GNUC__
- char param[0]; /* variable-length member */
- /* Safer to use [0] for gcc. See https://github.com/OSGeo/proj.4/pull/1087 */
+#if defined(__GNUC__) && __GNUC__ >= 8
+ char param[]; /* variable-length member */
+ /* Safer to use [] for gcc 8. See https://github.com/OSGeo/proj.4/pull/1087 */
+ /* and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86914 */
#else
char param[1]; /* variable-length member */
#endif
debian/patches/series
0 → 100644
View file @
e7cf9643
0001-Fix-wrong-behaviour-of-torad_coord-with-gcc-8.1-O2-f.patch
0001-projects.h-use-param-variable-length-member-syntax-w.patch
0001-4D-API_cs2cs-style.gie-rewrite-test-to-not-rely-on-p.patch