Skip to content

Commit

Permalink
Fix hypellfrob.pyx calling Python inside sig_on
Browse files Browse the repository at this point in the history
set_ntl_matrix_modn_dense uses isinstance so there is a chance for
Python garbage collection to run. Presumably you get the

    SystemError: calling remove_from_pari_stack() inside sig_on()

if that happens.

Fixes #33304
  • Loading branch information
vbraun committed Sep 6, 2024
1 parent 24698e7 commit 4fcf282
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/schemes/hyperelliptic_curves/hypellfrob.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ def interval_products(M0, M1, target):
cdef long dim = M0.nrows()
sig_on()
c.restore_c()
sig_off()
set_ntl_matrix_modn_dense(mm0, c, M0)
set_ntl_matrix_modn_dense(mm1, c, M1)
sig_on()
for t in target:
targ.push_back(ntl_ZZ(t).x)
numintervals = len(target)/2
Expand Down

0 comments on commit 4fcf282

Please sign in to comment.