[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2022-03-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2217462bda1865a047d358306088682ee6a091ed by Victor Stinner in branch 'main': bpo-45786: Remove _PyFrame_Fini() and _PyFrame_DebugMallocStats() (GH-31874) https://github.com/python/cpython/commit/2217462bda1865a047d358306088682ee6a091ed

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2022-03-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 2.0 -> 3.0 pull_requests: +29972 pull_request: https://github.com/python/cpython/pull/31874 ___ Python tracker ___

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2022-01-13 Thread Mark Shannon
Mark Shannon added the comment: With https://bugs.python.org/issue45963 both frame objects and generators contain space for the frame, so no allocation occurs on exit. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-29 Thread Mark Shannon
Mark Shannon added the comment: New changeset 60929576e40038ec71d896230f69e4411c82be4b by Mark Shannon in branch 'main': bpo-45786: Allocate space for frame in frame object. (GH-29729) https://github.com/python/cpython/commit/60929576e40038ec71d896230f69e4411c82be4b --

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

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

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Mark Shannon
Mark Shannon added the comment: Ok, so it is not as bad as I thought. A failed allocation might leave us with an invalid frameobject, though. So it is still worth fixing. -- ___ Python tracker

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Allocating memory can invoke GC Technically, only allocating objects can trigger GC (specifically initializing them). All the malloc APIs don't currently call the GC by themselves. -- ___ Python tracker

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Mark Shannon
New submission from Mark Shannon : We exiting a frame (returning from a Python function) we have to release the stack allocated frame. If a heap-allocated frame object exists, we need to copy the contents of the (stack) frame into the frame object. However, this involves allocating memory for