New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pynac should check for errors when calling PyObject_RichCompareBool() #24522
Comments
comment:2
Yes, this still looks like what I described. On Python 3 the exception leaks out, and slightly later on a call to On Python 3 there is no |
This comment has been minimized.
This comment has been minimized.
comment:4
I have an upstream fix for this ready--just need to make a PR... |
Upstream: Reported upstream. No feedback yet. |
This comment has been minimized.
This comment has been minimized.
Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, in a later stable release. |
comment:7
Thanks! This is low priority for now, as it only affects a few things on Python 3. We can close this along with the next update to pynac in Sage. |
comment:8
Can we close this now ? |
There are a number of methods in pynac's
ginac/numeric.cpp
module that don't check for error results fromPyObject_RichCompareBool
(which returns -1 on error).This leads to unhandled exceptions that, on Python 2, were somewhat by luck being cleared via
PyObject_Clear()
later in the call stack.On Python 3, the interpreter asserts
PyErr_Occurred
in more places and we don't get so lucky.Upstream PR: pynac/pynac#297
Upstream: Fixed upstream, in a later stable release.
CC: @rwst
Component: packages: standard
Keywords: pynac
Issue created by migration from https://trac.sagemath.org/ticket/24522
The text was updated successfully, but these errors were encountered: