diff -Nru arrayfire-3.3.2+dfsg1/debian/changelog arrayfire-3.3.2+dfsg1/debian/changelog --- arrayfire-3.3.2+dfsg1/debian/changelog 2016-08-22 10:19:22.000000000 +0000 +++ arrayfire-3.3.2+dfsg1/debian/changelog 2019-06-22 18:49:47.000000000 +0000 @@ -1,3 +1,12 @@ +arrayfire (3.3.2+dfsg1-4ubuntu2) eoan; urgency=medium + + * debian/patches/58ac59497b50257631713e689a6b0ddffb73361a.patch: + * debian/patches/1b18226dfec811e4b7b7254f5cfc85a3116a3dc2.patch: + * debian/patches/2149.patch: + - upstream bug fixes for gcc-8 and test failures. + + -- Gianfranco Costamagna Sat, 22 Jun 2019 20:49:47 +0200 + arrayfire (3.3.2+dfsg1-4ubuntu1) yakkety; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru arrayfire-3.3.2+dfsg1/debian/patches/1b18226dfec811e4b7b7254f5cfc85a3116a3dc2.patch arrayfire-3.3.2+dfsg1/debian/patches/1b18226dfec811e4b7b7254f5cfc85a3116a3dc2.patch --- arrayfire-3.3.2+dfsg1/debian/patches/1b18226dfec811e4b7b7254f5cfc85a3116a3dc2.patch 1970-01-01 00:00:00.000000000 +0000 +++ arrayfire-3.3.2+dfsg1/debian/patches/1b18226dfec811e4b7b7254f5cfc85a3116a3dc2.patch 2019-06-22 18:49:47.000000000 +0000 @@ -0,0 +1,38 @@ +From 1b18226dfec811e4b7b7254f5cfc85a3116a3dc2 Mon Sep 17 00:00:00 2001 +From: Shehzan Mohammed +Date: Fri, 23 Sep 2016 11:07:58 -0400 +Subject: [PATCH] Fix double free corruption when release arrays in + af_assign_seq + +--- + src/api/c/assign.cpp | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +Index: arrayfire-3.3.2+dfsg1/src/api/c/assign.cpp +=================================================================== +--- arrayfire-3.3.2+dfsg1.orig/src/api/c/assign.cpp ++++ arrayfire-3.3.2+dfsg1/src/api/c/assign.cpp +@@ -132,7 +132,10 @@ + AF_CHECK(af_assign_seq(&tmp_out, tmp_in, ndims, index, rhs)); + AF_CHECK(af_moddims(out, tmp_out, lInfo.ndims(), lInfo.dims().get())); + AF_CHECK(af_release_array(tmp_in)); +- AF_CHECK(af_release_array(tmp_out)); ++ // This can run into a double free issue if tmp_in == tmp_out ++ // The condition ensures release only if both are different ++ // Issue found on Tegra X1 ++ if(tmp_in != tmp_out) AF_CHECK(af_release_array(tmp_out)); + return AF_SUCCESS; + } + +@@ -241,7 +244,10 @@ + AF_CHECK(af_assign_gen(&tmp_out, tmp_in, ndims, indexs, rhs_)); + AF_CHECK(af_moddims(out, tmp_out, lInfo.ndims(), lInfo.dims().get())); + AF_CHECK(af_release_array(tmp_in)); +- AF_CHECK(af_release_array(tmp_out)); ++ // This can run into a double free issue if tmp_in == tmp_out ++ // The condition ensures release only if both are different ++ // Issue found on Tegra X1 ++ if(tmp_in != tmp_out) AF_CHECK(af_release_array(tmp_out)); + return AF_SUCCESS; + } + diff -Nru arrayfire-3.3.2+dfsg1/debian/patches/2149.patch arrayfire-3.3.2+dfsg1/debian/patches/2149.patch --- arrayfire-3.3.2+dfsg1/debian/patches/2149.patch 1970-01-01 00:00:00.000000000 +0000 +++ arrayfire-3.3.2+dfsg1/debian/patches/2149.patch 2019-06-22 18:49:47.000000000 +0000 @@ -0,0 +1,25 @@ +From 9eaa6fd2de3774d3f388a5b3175385fd8cc77669 Mon Sep 17 00:00:00 2001 +From: pradeep +Date: Tue, 8 May 2018 15:06:27 +0530 +Subject: [PATCH] Fix variable const qualifiers in blas files + +--- + src/backend/cpu/blas.cpp | 6 +++--- + src/backend/cpu/sparse_blas.cpp | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +Index: arrayfire-3.3.2+dfsg1/src/backend/cpu/blas.cpp +=================================================================== +--- arrayfire-3.3.2+dfsg1.orig/src/backend/cpu/blas.cpp ++++ arrayfire-3.3.2+dfsg1/src/backend/cpu/blas.cpp +@@ -157,8 +157,8 @@ + int aColDim = (lOpts == CblasNoTrans) ? 1 : 0; + int bColDim = (rOpts == CblasNoTrans) ? 1 : 0; + +- dim4 lDims = lhs.dims(); +- dim4 rDims = rhs.dims(); ++ auto lDims = lhs.dims(); ++ auto rDims = rhs.dims(); + int M = lDims[aRowDim]; + int N = rDims[bColDim]; + int K = lDims[aColDim]; diff -Nru arrayfire-3.3.2+dfsg1/debian/patches/58ac59497b50257631713e689a6b0ddffb73361a.patch arrayfire-3.3.2+dfsg1/debian/patches/58ac59497b50257631713e689a6b0ddffb73361a.patch --- arrayfire-3.3.2+dfsg1/debian/patches/58ac59497b50257631713e689a6b0ddffb73361a.patch 1970-01-01 00:00:00.000000000 +0000 +++ arrayfire-3.3.2+dfsg1/debian/patches/58ac59497b50257631713e689a6b0ddffb73361a.patch 2019-06-22 18:49:47.000000000 +0000 @@ -0,0 +1,52 @@ +From 58ac59497b50257631713e689a6b0ddffb73361a Mon Sep 17 00:00:00 2001 +From: Pavan Yalamanchili +Date: Wed, 25 May 2016 13:29:06 -0400 +Subject: [PATCH] BUGFIX: Fixes to index and array_proxy classes when using + c++11 + +--- + src/api/cpp/array.cpp | 1 + + src/api/cpp/index.cpp | 6 +++++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +Index: arrayfire-3.3.2+dfsg1/src/api/cpp/array.cpp +=================================================================== +--- arrayfire-3.3.2+dfsg1.orig/src/api/cpp/array.cpp ++++ arrayfire-3.3.2+dfsg1/src/api/cpp/array.cpp +@@ -558,6 +558,7 @@ + array::array_proxy& + af::array::array_proxy::operator=(array_proxy &&other) { + array out = other; ++ other.impl = nullptr; + return *this = out; + } + #endif +Index: arrayfire-3.3.2+dfsg1/src/api/cpp/index.cpp +=================================================================== +--- arrayfire-3.3.2+dfsg1.orig/src/api/cpp/index.cpp ++++ arrayfire-3.3.2+dfsg1/src/api/cpp/index.cpp +@@ -80,8 +80,10 @@ + } + + index::~index() { +- if (!impl.isSeq) ++ if (!impl.isSeq && impl.idx.arr) + af_release_array(impl.idx.arr); ++ ++ + } + + index & index::operator=(const index& idx0) { +@@ -97,10 +99,12 @@ + #if __cplusplus > 199711L + index::index(index &&idx0) { + impl = idx0.impl; ++ idx0.impl.idx.arr = nullptr; + } + + index& index::operator=(index &&idx0) { + impl = idx0.impl; ++ idx0.impl.idx.arr = nullptr; + return *this; + } + #endif diff -Nru arrayfire-3.3.2+dfsg1/debian/patches/series arrayfire-3.3.2+dfsg1/debian/patches/series --- arrayfire-3.3.2+dfsg1/debian/patches/series 2016-08-16 17:14:03.000000000 +0000 +++ arrayfire-3.3.2+dfsg1/debian/patches/series 2019-06-22 18:49:47.000000000 +0000 @@ -5,3 +5,6 @@ Fix-LAPACKE-detection.patch Enable-support-for-GNU-Hurd.patch Use-compute-library-from-Boost-1.61.patch +58ac59497b50257631713e689a6b0ddffb73361a.patch +1b18226dfec811e4b7b7254f5cfc85a3116a3dc2.patch +2149.patch