Skip to content

Commit ca3d59a

Browse files
author
Release Manager
committed
gh-37792: remove a stray leftover in in sa2si_ZZmod() As reported on [sage-devel](https://groups.google.com/g/sage- devel/c/r7IpxjZTz5Y/m/d0I95VSnAAAJ) and reproduced, the following crashes Sage with probability about 1/3. ```python x,y=var('x,y');n=10**6 while True: so=solve_mod(x*y-1,n) #press CTL-C, crashes with probability about 1/3 ``` The backtrace points to is a meaningless assignment in `sa2si_ZZmod()` ```python nr2mModul = d.parent().characteristic() ``` where this happens. `nr2mModul` is not used anywhere in the code. Removing it appears to make the crash to go away. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. URL: #37792 Reported by: Dima Pasechnik Reviewer(s):
2 parents e9e3a3d + 4b35649 commit ca3d59a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/sage/libs/singular/singular.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,6 @@ cdef inline number *sa2si_ZZmod(IntegerMod_abstract d, ring *_ring) noexcept:
15441544
sage: P(3)
15451545
3
15461546
"""
1547-
nr2mModul = d.parent().characteristic()
15481547
if _ring != currRing: rChangeCurrRing(_ring)
15491548

15501549
cdef number *nn

0 commit comments

Comments
 (0)