Skip to content

Conversation

@AZero13
Copy link
Contributor

@AZero13 AZero13 commented Dec 9, 2025

We should not fflush a file that has not been written to if it fails.

@vstinner vstinner changed the title Check for errors before calling each syscall Check for errors before calling each syscall in PyUnstable_CopyPerfMapFile() Dec 10, 2025
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

cc @pablogsal

@pablogsal
Copy link
Member

We need a news entry and we can backport it. @AZero13 can you add one?

@AZero13 AZero13 changed the title Check for errors before calling each syscall in PyUnstable_CopyPerfMapFile() gh-142571: Check for errors before calling each syscall in PyUnstable_CopyPerfMapFile() Dec 11, 2025
We should not fflush a file that has not been written to if it fails.
AZero13 and others added 2 commits December 11, 2025 12:00
…e-142571.Csdxnn.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…xnn.rst

Co-authored-by: Victor Stinner <vstinner@python.org>
@pablogsal pablogsal added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Dec 11, 2025
@pablogsal pablogsal enabled auto-merge (squash) December 11, 2025 20:53
@pablogsal pablogsal merged commit 9fe6e3e into python:main Dec 11, 2025
50 checks passed
@miss-islington-app
Copy link

Thanks @AZero13 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 11, 2025
…nstable_CopyPerfMapFile()` (pythonGH-142460)

(cherry picked from commit 9fe6e3e)

Co-authored-by: AZero13 <gfunni234@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@miss-islington-app
Copy link

Sorry, @AZero13 and @pablogsal, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 9fe6e3ed365f40d89a47c2a255e11f0363e9aa78 3.13

@bedevere-app
Copy link

bedevere-app bot commented Dec 11, 2025

GH-142600 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Dec 11, 2025
StanFromIreland added a commit to StanFromIreland/cpython that referenced this pull request Dec 11, 2025
…in `PyUnstable_CopyPerfMapFile()` (pythonGH-142460)

(cherry picked from commit 9fe6e3e)

Co-authored-by: AZero13 <gfunni234@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Dec 11, 2025

GH-142602 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Dec 11, 2025
@AZero13 AZero13 deleted the flush branch December 11, 2025 21:34
pablogsal added a commit that referenced this pull request Dec 11, 2025
…Unstable_CopyPerfMapFile()` (GH-142460) (#142602)

Co-authored-by: AZero13 <gfunni234@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit that referenced this pull request Dec 11, 2025
…Unstable_CopyPerfMapFile()` (GH-142460) (#142600)

Co-authored-by: AZero13 <gfunni234@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
fatelei pushed a commit to fatelei/cpython that referenced this pull request Dec 12, 2025
…nstable_CopyPerfMapFile()` (python#142460)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants