-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Segmentation fault when instantiating decimal.SignalDictMixin
type
#106263
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
Labels
type-crash
A hard crash of the interpreter, possibly with a core dump
Comments
Note: This problem will not be triggered normally, because we will assign a value to >>> import decimal
>>> flags = decimal.Context().flags
>>> tp = type(flags)
>>> tp
<class 'abc.SignalDict'>
>>> flags
{<class 'decimal.InvalidOperation'>:False, <class 'decimal.FloatOperation'>:False, <class 'decimal.DivisionByZero'>:False, <class 'decimal.Overflow'>:False, <class 'decimal.Underflow'>:False, <class 'decimal.Subnormal'>:False, <class 'decimal.Inexact'>:False, <class 'decimal.Rounded'>:False, <class 'decimal.Clamped'>:False} |
The simplest solution is to assign default values to signaldict object in the |
kumaraditya303
pushed a commit
that referenced
this issue
Jul 30, 2023
…06270) Co-authored-by: sunmy2019 <[email protected]>
CharlieZhao95
added a commit
to CharlieZhao95/cpython
that referenced
this issue
Jul 31, 2023
…le (python#106270) Co-authored-by: sunmy2019 <[email protected]> (cherry picked from commit 3979150)
CharlieZhao95
added a commit
to CharlieZhao95/cpython
that referenced
this issue
Jul 31, 2023
…le (python#106270) Co-authored-by: sunmy2019 <[email protected]> (cherry picked from commit 3979150)
This was referenced Jul 31, 2023
ambv
pushed a commit
that referenced
this issue
Jul 31, 2023
…ule (#… (#107491) Co-authored-by: sunmy2019 <[email protected]> (cherry picked from commit 3979150)
ambv
pushed a commit
that referenced
this issue
Jul 31, 2023
…ule (#… (#107490) Co-authored-by: sunmy2019 <[email protected]> (cherry picked from commit 3979150)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Crash report
The following code will causes a segmentation fault:
This code instantiates an object of
SignalDict
type (inherited from the base classSignalDictMixin
) and tries to print the contents of the object (use repr).The problem is caused by the following C code, where the
signaldict_repr
function accesses a null pointer.Your environment
Linked PRs
signaldict_repr
#106270signaldict_repr
in_decimal
module (#… #107490signaldict_repr
in_decimal
module (#… #107491The text was updated successfully, but these errors were encountered: