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

19 lines
994 B
Diff

diff -up src/sage/graphs/graph_decompositions/cutwidth.pyx.orig src/sage/graphs/graph_decompositions/cutwidth.pyx
--- src/sage/graphs/graph_decompositions/cutwidth.pyx.orig 2022-01-30 06:41:50.000000000 -0700
+++ src/sage/graphs/graph_decompositions/cutwidth.pyx 2022-03-06 17:04:36.234711622 -0700
@@ -522,12 +522,12 @@ def cutwidth_dyn(G, lower_bound=0):
if exists(g, neighborhoods, 0, 0, i, k) <= k:
order = find_order(g, neighborhoods, k)
return k, [g.int_to_vertices[i] for i in order]
+
+ order = find_order(g, neighborhoods, k)
+ return k, [g.int_to_vertices[i] for i in order]
finally:
sig_free(neighborhoods)
- order = find_order(g, neighborhoods, k)
- return k, [g.int_to_vertices[i] for i in order]
-
cdef inline int exists(FastDigraph g, uint8_t* neighborhoods, int S, int cost_S, int v, int k):
r"""
Check whether an ordering with the given cost `k` exists, and updates data