This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JunyiXie
Recipients JunyiXie, vstinner
Date 2021-03-15.13:03:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615813396.21.0.613149904978.issue43313@roundup.psfhosted.org>
In-reply-to
Content
There is a problem:
if we bound pymalloc state with a interpreter.
malloc pointer in interpreterA and free pointer is usual.

it's cause a problem. 
when we use PyObject_Free, 
1. we look up address in pymalloc pool.
2. if not find, current code will call PyMem_RawFree(p) to free. it will cause crash.(address is pymalloc_alloc from another interpreter)

I think it has two way to slove this problem:
1. free/alloc memory in one interpreter. Frequent switch interpreter affects performance
2. when free memory address, find this address in all interpreter pymalloc pool. and free it.(but it need add lock to pymalloc)
History
Date User Action Args
2021-03-15 13:03:16JunyiXiesetrecipients: + JunyiXie, vstinner
2021-03-15 13:03:16JunyiXiesetmessageid: <1615813396.21.0.613149904978.issue43313@roundup.psfhosted.org>
2021-03-15 13:03:16JunyiXielinkissue43313 messages
2021-03-15 13:03:16JunyiXiecreate