Message318990
| Author |
vstinner |
| Recipients |
ned.deily, vstinner, yselivanov |
| Date |
2018-06-07.23:44:54 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1528415094.5.0.592728768989.issue33803@psf.upfronthosting.co.za> |
| In-reply-to |
|
| Content |
test_asyncio started to crash in https://github.com/python/cpython/pull/7487
I debugged the crash with Yury: _PyHAMT_New() triggers indirectly a GC collection at "o->h_root = hamt_node_bitmap_new(0);". Problem: the object that is being created is already tracked by the GC, whereas its h_root field is not set. Then the GC does crash because the field is a random pointer.
hamt_alloc() must initialize h_root and h_count before tracking the object in the GC.
Thinking about the GC when writing an object constructor is hard :-(
Maybe we should add a debug option to trigger the GC more often to make such random bug more likely. contextvars has been implemented a few months ago, and we only spotted the bug a few days before Python 3.7.0 final release... |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018-06-07 23:44:54 | vstinner | set | recipients:
+ vstinner, ned.deily, yselivanov |
| 2018-06-07 23:44:54 | vstinner | set | messageid: <1528415094.5.0.592728768989.issue33803@psf.upfronthosting.co.za> |
| 2018-06-07 23:44:54 | vstinner | link | issue33803 messages |
| 2018-06-07 23:44:54 | vstinner | create | |
|