{{ message }}
gh-103295: fix stack overwrite on 32-bit in perf map test harness#104811
Merged
carljm merged 1 commit intopython:mainfrom May 23, 2023
Merged
gh-103295: fix stack overwrite on 32-bit in perf map test harness#104811carljm merged 1 commit intopython:mainfrom
carljm merged 1 commit intopython:mainfrom
Conversation
Contributor
Member
Author
|
Looks like the builds all succeeded 🎉 |
Contributor
All architectures built, tests have passed. |
Member
Author
|
I'm going to go ahead and merge this to help unblock the Fedora builds, since this PR only touches test harness and the test signal is all good (including the Fedora build signal on multiple platforms, including 32-bit.) If there are any concerns with anything here, I'll be happy to do a follow-up PR to address comments. |
Contributor
|
Thanks @carljm for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 23, 2023
…ss (pythonGH-104811) (cherry picked from commit e0b3078) Co-authored-by: Carl Meyer <carl@oddbird.net>
carljm
added a commit
that referenced
this pull request
May 23, 2023
hrnciar
added a commit
to fedora-python/cpython
that referenced
this pull request
May 24, 2023
…GH-104811) (python#104823) pythongh-103295: fix stack overwrite on 32-bit in perf map test harness (pythonGH-104811) (cherry picked from commit e0b3078) Co-authored-by: Carl Meyer <carl@oddbird.net>
hrnciar
pushed a commit
to fedora-python/cpython
that referenced
this pull request
May 24, 2023
facebook-github-bot
pushed a commit
to facebookincubator/cinder
that referenced
this pull request
May 24, 2023
Summary: Port the latest changes from the [perf-map C-API PR](python/cpython#103546). This includes using error codes instead of exceptions to avoid the need to hold the GIL. Additionally, there was an issue with Fedora on a 32-bit system that was fixed in this [PR](python/cpython#104811), so I also ported the fix. Reviewed By: carljm Differential Revision: D46041553 fbshipit-source-id: 6502189f489ca6cf11949ecd93c044e5ebe4fd2c
bmwiedemann
pushed a commit
to bmwiedemann/openSUSE
that referenced
this pull request
Jun 3, 2023
https://build.opensuse.org/request/show/1090558 by user mcepl + dimstar_suse - Add 00398-fix-stack-overwrite-on-32-bit-in-perf-map-test-harness-gh-104811-104823.patch gh#python/cpython#104811 - Refresh all patches - Update to 3.12.0b1: Full changelog can be found here https://docs.python.org/dev/whatsnew/changelog.html#python-3-12-0-beta-1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

We can't use
Kformat specifier inPyArg_ParseTupleto write to avoid *; it always writes 64 bits, so writes too much on 32-bit systems. UseOinstead and an explicit call toPyLong_AsVoidPtrto get the pointer value.Also fix the error check so it detects either error code (
-1or-2) and raises a more informative error usingerrno. I verified this error handling by temporarily changing the perf map file path to a nonexistent directory, and the test raisedFileNotFoundErroras expected.Also simplify the return value to just use
PyLong_FromLong; we don't need to go throughPy_BuildValuefor such a simple case.