sagemath/sagemath-infinite-recursion.patch
Jerry James 30bb46d8dc Version 9.5.
Drop unnecessary -4ti2 and -primecount patches.
2022-03-21 08:59:27 -06:00

22 lines
1.4 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Fix this warning:
sage/matrix/matrix_rational_dense.cpp: In function __pyx_f_4sage_4libs_3gmp_9randomize_mpq_randomize_entry_recip_uniform_nonzero(__mpq_struct*):
sage/matrix/matrix_rational_dense.cpp:28763:27: warning: infinite recursion detected [-Winfinite-recursion]
28763 | static CYTHON_INLINE void __pyx_f_4sage_4libs_3gmp_9randomize_mpq_randomize_entry_recip_uniform_nonzero(__mpq_struct *__pyx_v_x) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sage/matrix/matrix_rational_dense.cpp:28775:80: note: recursive call
28775 | __pyx_f_4sage_4libs_3gmp_9randomize_mpq_randomize_entry_recip_uniform_nonzero(__pyx_v_x);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
diff -up src/sage/libs/gmp/randomize.pxd.orig src/sage/libs/gmp/randomize.pxd
--- src/sage/libs/gmp/randomize.pxd.orig 2022-01-30 06:41:50.000000000 -0700
+++ src/sage/libs/gmp/randomize.pxd 2022-03-06 12:36:38.591777518 -0700
@@ -51,6 +51,6 @@ cdef inline void mpq_randomize_entry_rec
mpq_canonicalize(x)
cdef inline void mpq_randomize_entry_recip_uniform_nonzero(mpq_t x):
- mpq_randomize_entry_recip_uniform_nonzero(x)
+ mpq_randomize_entry_recip_uniform(x)
while mpq_sgn(x) == 0:
- mpq_randomize_entry_recip_uniform_nonzero(x)
+ mpq_randomize_entry_recip_uniform(x)