[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-18 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: > `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

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Mark: > `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. I created bpo-46417 follow-up issue: "[subinterpreters] Clear static types in Py_Finalize()".

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-17 Thread STINNER Victor
STINNER Victor added the comment: > many classes are allocated statically Right. Changing that is an hard problem :-( See for example bpo-40601 "[C API] Hide static types from the limited C API". I tried once to "free" / reset static types in Py_Finalize(), but it's hard to implement

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-03 Thread Mark Shannon
Mark Shannon added the comment: New changeset acc89db9233abf4d903af9a7595a2ed7478fe7d3 by Mark Shannon in branch 'main': bpo-45691: Make array of small ints static to fix use-after-free error. (GH-29366) https://github.com/python/cpython/commit/acc89db9233abf4d903af9a7595a2ed7478fe7d3

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-02 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-02 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +27626 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29366 ___ Python tracker ___

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-02 Thread Mark Shannon
New submission from Mark Shannon : 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