-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-142571: Check for errors before calling each syscall in PyUnstable_CopyPerfMapFile()
#142460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PyUnstable_CopyPerfMapFile()
vstinner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
cc @pablogsal
|
We need a news entry and we can backport it. @AZero13 can you add one? |
PyUnstable_CopyPerfMapFile()PyUnstable_CopyPerfMapFile()
We should not fflush a file that has not been written to if it fails.
Misc/NEWS.d/next/Core_and_Builtins/2025-12-11-09-06-36.gh-issue-142571.Csdxnn.rst
Outdated
Show resolved
Hide resolved
…e-142571.Csdxnn.rst Co-authored-by: Stan Ulbrych <[email protected]>
Misc/NEWS.d/next/C_API/2025-12-11-09-06-36.gh-issue-142571.Csdxnn.rst
Outdated
Show resolved
Hide resolved
…xnn.rst Co-authored-by: Victor Stinner <[email protected]>
|
Thanks @AZero13 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…nstable_CopyPerfMapFile()` (pythonGH-142460) (cherry picked from commit 9fe6e3ed365f40d89a47c2a255e11f0363e9aa78) Co-authored-by: AZero13 <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
|
Sorry, @AZero13 and @pablogsal, I could not cleanly backport this to |
|
GH-142600 is a backport of this pull request to the 3.14 branch. |
…in `PyUnstable_CopyPerfMapFile()` (pythonGH-142460) (cherry picked from commit 9fe6e3e) Co-authored-by: AZero13 <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
|
GH-142602 is a backport of this pull request to the 3.13 branch. |
…Unstable_CopyPerfMapFile()` (GH-142460) (#142602) Co-authored-by: AZero13 <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
…Unstable_CopyPerfMapFile()` (GH-142460) (#142600) Co-authored-by: AZero13 <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
…nstable_CopyPerfMapFile()` (python#142460) Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
We should not fflush a file that has not been written to if it fails.
PyUnstable_CopyPerfMapFilecalls fflush even when the file fails to open. #142571