mirror of
https://github.com/python/cpython.git
synced 2025-10-19 16:03:42 +00:00
[3.14] gh-140067: Fix memory leak in sub-interpreter creation (GH-140111) (#140118)
* [3.14] gh-140067: Fix memory leak in sub-interpreter creation (GH-140111)
Fix memory leak in sub-interpreter creation caused by overwriting of the previously used `_malloced` field. Now the pointer is stored in the first word of the memory block to avoid it being overwritten accidentally.
(cherry picked from commit 59547a251f
)
Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
3ca7ea1f8f
commit
1d11627ba5
4 changed files with 12 additions and 10 deletions
|
@ -1727,6 +1727,7 @@ def task():
|
|||
self.assertEqual(os.read(r_interp, 1), DONE)
|
||||
|
||||
@cpython_only
|
||||
@support.skip_if_sanitizer(thread=True, memory=True)
|
||||
def test_daemon_threads_fatal_error(self):
|
||||
import_module("_testcapi")
|
||||
subinterp_code = f"""if 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue