Skip to content

Commit 9a14927

Browse files
committed
Wrap gclone() call in sig_on()
1 parent dc9aa2d commit 9a14927

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cypari2/stack.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cimport cython
1919

2020
from cpython.ref cimport PyObject, Py_XINCREF, Py_XDECREF
2121

22-
from cysignals.signals cimport sig_off
22+
from cysignals.signals cimport sig_on, sig_off
2323
from cysignals.memory cimport check_malloc, sig_free
2424

2525
from .gen cimport Gen, Gen_new
@@ -118,8 +118,10 @@ cdef int move_gens_to_heap(pari_sp lim) except -1:
118118
avma <= lim.
119119
"""
120120
while avma <= lim and stackbottom is not <PyObject*>top_of_stack:
121+
sig_on()
121122
current = <Gen>stackbottom
122123
h = gclone(current.g)
124+
sig_off()
123125
remove_from_pari_stack(current)
124126
current.g = current.address = h
125127

0 commit comments

Comments
 (0)