Bug#986896: unblock: armadillo/1:10.1.2+dfsg-5
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package armadillo
[ Reason ]
The pinv and rcond functions have bugs that prevent proper
operation. The former had a a potential divide by zero issue, while
the latter had a compilation related issue. The patches are quite
small, and are present in the version in sid. The patches are attached.
[ Impact ]
Not unblocking would result in buggy numerical code being shipped.
[ Risks ]
There are no risks that I foresee.
[ Checklist ]
[Y] all changes are documented in the d/changelog
[Y] I reviewed all changes and I approve them
[Y] attach debdiff against the package in testing
[ Other info ]
(Anything else the release team should know.)
unblock armadillo/1:10.1.2+dfsg-5
diff -Naur armadillo-10.1.2/include/armadillo_bits/op_cond_meat.hpp armadillo-10.1.2-rcond-bugfix/include/armadillo_bits/op_cond_meat.hpp
--- armadillo-10.1.2/include/armadillo_bits/op_cond_meat.hpp 2016-06-17 02:22:12.000000000 +1000
+++ armadillo-10.1.2-rcond-bugfix/include/armadillo_bits/op_cond_meat.hpp 2021-03-09 16:23:18.251117619 +1000
@@ -58,11 +58,13 @@
{
const strip_trimat<T1> S(X.get_ref());
- arma_debug_check( (S.M.is_square() == false), "rcond(): matrix must be square sized" );
+ const quasi_unwrap<typename strip_trimat<T1>::stored_type> U(S.M);
+
+ arma_debug_check( (U.M.is_square() == false), "rcond(): matrix must be square sized" );
const uword layout = (S.do_triu) ? uword(0) : uword(1);
- return auxlib::rcond_trimat(S.M, layout);
+ return auxlib::rcond_trimat(U.M, layout);
}
Mat<eT> A = X.get_ref();
diff -Naur armadillo-10.1.2/include/armadillo_bits/op_pinv_meat.hpp armadillo-10.1.2-pinv-bugfix/include/armadillo_bits/op_pinv_meat.hpp
--- armadillo-10.1.2/include/armadillo_bits/op_pinv_meat.hpp 2016-06-17 02:22:12.000000000 +1000
+++ armadillo-10.1.2-pinv-bugfix/include/armadillo_bits/op_pinv_meat.hpp 2021-03-09 16:25:49.909112061 +1000
@@ -119,7 +119,7 @@
{
const T val = s_mem[i];
- if(val >= tol) { s2_mem[count2] = T(1) / val; ++count2; }
+ if(val >= tol) { s2_mem[count2] = (val > T(0)) ? T(T(1) / val) : T(0); ++count2; }
}
Reply to: