Skip to content

Commit

Permalink
sagemathgh-38628: 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 sagemath#33304
    
URL: sagemath#38628
Reported by: Volker Braun
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Sep 8, 2024
2 parents db902fd + 4fcf282 commit cd38d5f
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 cd38d5f

Please sign in to comment.