GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.14] gh-140067: Fix memory leak in sub-interpreter creation (GH-140111) by kumaraditya303 · Pull Request #140118 · python/cpython

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Oct 14, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 59547a2)

  • Issue: Memory leak in test_sys with subinterpreters creation (AddressSanitizer detection) #140067

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ashm-dev and others added 2 commits October 14, 2025 20:17
@ashm-dev @kumaraditya303
[3.14] pythongh-140067: Fix memory leak in sub-interpreter creation (p…
a25bab8
…ythonGH-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 59547a2)

Co-authored-by: Shamil <[email protected]>
Co-authored-by: Kumar Aditya <[email protected]>
@kumaraditya303
fix ABI compatibility
344b491
@kumaraditya303
kumaraditya303 requested a review from ericsnowcurrently as a code owner October 14, 2025 14:49
@bedevere-app bedevere-app Bot mentioned this pull request Oct 14, 2025
Memory leak in test_sys with subinterpreters creation (AddressSanitizer detection) #140067
Closed
@bedevere-app bedevere-app Bot added awaiting core review topic-subinterpreters labels Oct 14, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Oct 14, 2025
gh-140067: Fix memory leak in sub-interpreter creation #140111
Merged
@kumaraditya303 kumaraditya303 changed the title [3.14] gh-140067: Fix memory leak in sub-interpreter creation (GH-14… [3.14] gh-140067: Fix memory leak in sub-interpreter creation (GH-140111) Oct 14, 2025
@kumaraditya303

kumaraditya303 commented Oct 14, 2025

Copy link
Copy Markdown
Contributor Author

There's a somewhat surprising failing test on gil-enabled tsan CI, will investigate later marking draft for now

cc @ZeroIntensity

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303
kumaraditya303 marked this pull request as draft October 14, 2025 16:35
@bedevere-app bedevere-app Bot removed the awaiting core review label Oct 14, 2025
@ZeroIntensity

ZeroIntensity commented Oct 14, 2025

Copy link
Copy Markdown
Member

I think that's a known failure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity

ZeroIntensity commented Oct 14, 2025

Copy link
Copy Markdown
Member

Oh, nevermind, #140111 was what caused that known failure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kumaraditya303 added 3 commits October 17, 2025 22:06
@kumaraditya303
add suppressions
c0dee26
@kumaraditya303
Revert "add suppressions"
415e5e2
This reverts commit c0dee26.
@kumaraditya303
add skip marker
d7e44f7
@kumaraditya303
kumaraditya303 force-pushed the backport-59547a2-3.14 branch from 61a20ac to d7e44f7 Compare October 17, 2025 16:51
@kumaraditya303
kumaraditya303 marked this pull request as ready for review October 18, 2025 11:07
@bedevere-app bedevere-app Bot added the awaiting core review label Oct 18, 2025
@kumaraditya303
Merge branch '3.14' into backport-59547a2-3.14
150ae29
@kumaraditya303 kumaraditya303 added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 18, 2025
@bedevere-bot

bedevere-bot commented Oct 18, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit 150ae29 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F140118%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 18, 2025
@kumaraditya303
kumaraditya303 merged commit 1d11627 into python:3.14 Oct 18, 2025
60 of 65 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Oct 18, 2025
@kumaraditya303
kumaraditya303 deleted the backport-59547a2-3.14 branch October 18, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic-subinterpreters

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@kumaraditya303 @ZeroIntensity @bedevere-bot @ashm-dev
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.