[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#949895: buster-pu: package boost1.67/1.67.0-13+deb10u1



Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu

  * Patch undefined behaviour leading to crashing libboost-numpy (closes:
    #945987).

"git format-patch" gives better patch filenames,
but I prefer not to diverge from unstable.
diff -Nru boost1.67-1.67.0/debian/changelog boost1.67-1.67.0/debian/changelog
--- boost1.67-1.67.0/debian/changelog	2019-02-04 16:25:45.000000000 +0200
+++ boost1.67-1.67.0/debian/changelog	2020-01-26 21:20:04.000000000 +0200
@@ -1,3 +1,11 @@
+boost1.67 (1.67.0-13+deb10u1) buster; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch undefined behaviour leading to crashing libboost-numpy (closes:
+    #945987).
+
+ -- Adrian Bunk <bunk@debian.org>  Sun, 26 Jan 2020 21:20:04 +0200
+
 boost1.67 (1.67.0-13) unstable; urgency=medium
 
   * [c573257] Fix FTBFS in boost.compute with GCC-8. (Closes: #921247)
diff -Nru boost1.67-1.67.0/debian/patches/ed4776b59caec6dfbea548a96701a810653e6f24.patch boost1.67-1.67.0/debian/patches/ed4776b59caec6dfbea548a96701a810653e6f24.patch
--- boost1.67-1.67.0/debian/patches/ed4776b59caec6dfbea548a96701a810653e6f24.patch	1970-01-01 02:00:00.000000000 +0200
+++ boost1.67-1.67.0/debian/patches/ed4776b59caec6dfbea548a96701a810653e6f24.patch	2020-01-26 21:19:32.000000000 +0200
@@ -0,0 +1,25 @@
+From: Moritz Wanzenböck <moritz.wanzenboeck@catalysts.cc>
+Date: Wed Jul 11 11:57:46 2018 +0200
+Subject: Add missing return statement in numpy import
+    
+This adds a missing return statement in the python3 specific
+import logic of boost.python.numpy.
+    
+For python3 wrap_import_array() needs to return a pointer value.
+The import_array() macro only returns NULL in case of error. The
+missing return statement is UB, so the compiler can assume it does
+not happen. This means the compiler can assume the error branch
+is always taken, so import_array must always fail.
+
+diff --git a/libs/python/src/numpy/numpy.cpp b/libs/python/src/numpy/numpy.cpp
+index 8e259bc7..3ae2295e 100644
+--- a/libs/python/src/numpy/numpy.cpp
++++ b/libs/python/src/numpy/numpy.cpp
+@@ -19,6 +19,7 @@ static void wrap_import_array()
+ static void * wrap_import_array()
+ {
+   import_array();
++  return NULL;
+ }
+ #endif
+ 
diff -Nru boost1.67-1.67.0/debian/patches/series boost1.67-1.67.0/debian/patches/series
--- boost1.67-1.67.0/debian/patches/series	2019-02-04 16:21:14.000000000 +0200
+++ boost1.67-1.67.0/debian/patches/series	2020-01-26 21:19:47.000000000 +0200
@@ -18,3 +18,4 @@
 fix_linux_detection.patch
 002-fix-powerpc-uClibc-build-issue.patch
 fix-boost-compute-gcc8-ftbfs.patch
+ed4776b59caec6dfbea548a96701a810653e6f24.patch

Reply to: