Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Closed
Description
Crash report
The following programs defined a class C. In C, we perform dic clear() operation. When we set state of exception object with the dic, it causes segmentation fault on main branch (68c46ae) and latest stable Python 3.8.14. But it does not trigger any crashing on Python-3.11.0rc2 and Python 3.9.0.
class C(str): def __hash__(self): d.clear() return 0d = {}d[C()] = C()e = Exception()e.__setstate__(d)
Error messages
Segmentation Fault (Core dumped)
Your environment
- CPython versions tested on: Python 3.8.14 and main branch (68c46ae)
- Operating system and architecture: [GCC 7.5.0] on linux