Files
RustPython/extra_tests/snippets
Luan Taraschi 8de2cbe732 Fix object.__getstate__ deadlock and panic on __slotnames__ (#8981)
object_getstate_default kept the __slotnames__ list read-locked while it
looked up each slot attribute. A getter or __getattr__ that changed the
list (as in test_descr.test_issue24097) then waited forever for the write
lock. A non-str entry in a cached __slotnames__ hit an unwrap and
panicked.

Take a reference to each name and drop the lock before the lookup, raise
TypeError for a non-str name, let errors other than AttributeError
propagate, and check the list size after each item, as CPython does.

Assisted-by: Claude Code:claude-opus-5-5
2026-10-15 20:45:42 +09:00
..
2025-12-12 22:46:39 +09:00
2020-09-13 06:58:57 +09:00
2020-09-13 06:58:57 +09:00
2020-09-13 06:58:57 +09:00
2020-09-13 06:58:57 +09:00
2020-09-13 06:58:57 +09:00
2020-09-13 06:58:57 +09:00
2025-12-12 22:46:39 +09:00
2025-12-12 22:46:39 +09:00
2026-01-17 19:21:10 +09:00
2020-09-13 06:58:57 +09:00
2025-12-12 22:46:39 +09:00
2026-01-17 19:21:11 +09:00
2026-01-17 19:21:11 +09:00
2020-09-13 06:58:57 +09:00
2025-12-12 22:46:39 +09:00
2020-09-13 06:58:57 +09:00
2025-05-12 14:20:01 +09:00
2025-05-12 14:20:01 +09:00
2025-12-12 22:46:39 +09:00
2026-02-08 13:58:30 +00:00
2022-10-17 13:45:15 +09:00
2025-12-12 22:46:39 +09:00
2025-12-12 22:46:39 +09:00
2025-12-12 22:46:39 +09:00
2025-12-12 22:46:39 +09:00
2023-05-19 14:05:36 -04:00
2025-02-13 14:11:01 +09:00
2023-02-13 21:28:19 +09:00
2022-05-04 02:54:59 +09:00
2025-08-26 21:48:46 +09:00
2020-09-13 06:58:57 +09:00