Crash in UnicodeError.__str__
with attributes have custom __str__
#128974
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
The segmentation fault is quite easy to fix:
It occurs in
PyUnicode_GET_LENGTH(exc->object);
. And the reason is thatPyObject_Str(...)
may call artrbitary code.I have a PR ready that I will post soon.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Output from running 'python -VV' on the command line:
No response
Linked PRs
UnicodeError.__str__
when custom attributes have side-effects #128975The text was updated successfully, but these errors were encountered: