Message405514
We currently have an unstable state in the VM where some core objects are static and some are per-interpreter.
For example, smalls ints are allocated per-interpreter, but many classes are allocated statically.
This means that if any int is reachable from a class, then references to per-interpreter objects can be left dangling, or be out of date.
E.g. consider this sequence:
1. Create an interpreter
2. Destroy it.
3. Create a new interpreter
`sys.float_info.n_unnamed_fields` causes a memory violation if the per-interpreter allocated 0 held by sys.float_info.n_unnamed_fields is freed.
If it is not freed, then `sys.float_info.n_unnamed_fields is 0` is False, meaning that there are two zeros present.
The above is just an example. Classes have many references to ints, floats, code objects, etc. Any of those could have the same issue.
All objects that form the core object graph must either be entirely static, or entirely per-interpreter.
We cannot change from static to per-interpreter in a piecemeal fashion. It must be done all at once. |
|
Date |
User |
Action |
Args |
2021-11-02 16:04:49 | Mark.Shannon | set | recipients:
+ Mark.Shannon, vstinner, eric.snow |
2021-11-02 16:04:49 | Mark.Shannon | set | messageid: <1635869089.92.0.280577291297.issue45691@roundup.psfhosted.org> |
2021-11-02 16:04:49 | Mark.Shannon | link | issue45691 messages |
2021-11-02 16:04:49 | Mark.Shannon | create | |
|