Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Closed
Description
Bug report
Bug description:
classC:passf=C()# Reader code:f.foo# Writer code:f.__dict__= {}
When there's a thread reading from an object and another thread replacing the dictionary we can crash. This is because the read has a borrowed reference to the dictionary which gets simultaneously decref'd when the writer replaces it.
Expected behavior: No crashes
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux