Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-103295: fix stack overwrite on 32-bit in perf map test harness#104811

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
carljm merged 1 commit intopython:mainfromcarljm:fixperfmaptest
May 23, 2023

Conversation

carljm
Copy link
Member

@carljmcarljm commentedMay 23, 2023
edited by bedevere-bot
Loading

We can't useK format specifier inPyArg_ParseTuple to write to avoid *; it always writes 64 bits, so writes too much on 32-bit systems. UseO instead and an explicit call toPyLong_AsVoidPtr to get the pointer value.

Also fix the error check so it detects either error code (-1 or-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 raisedFileNotFoundError as expected.

Also simplify the return value to just usePyLong_FromLong; we don't need to go throughPy_BuildValue for such a simple case.

@carljmcarljm marked this pull request as ready for reviewMay 23, 2023 19:40
@carljmcarljm requested a review frompablogsalMay 23, 2023 19:41
@hroncok
Copy link
Contributor

A Fedora build with this patch applied on top of 3.12.0b1 tarball.

https://koji.fedoraproject.org/koji/taskinfo?taskID=101500963

It is hopefully set up not to terminate the build immediately when one architecture fails. Let's see.

carljm reacted with heart emoji

@carljmcarljm added the needs backport to 3.12only security fixes labelMay 23, 2023
@carljm
Copy link
MemberAuthor

Looks like the builds all succeeded 🎉

gsallam reacted with heart emoji

@hroncok
Copy link
Contributor

A Fedora build with this patch applied on top of 3.12.0b1 tarball.

https://koji.fedoraproject.org/koji/taskinfo?taskID=101500963

All architectures built, tests have passed.

@carljm
Copy link
MemberAuthor

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.

@carljmcarljm merged commite0b3078 intopython:mainMay 23, 2023
@miss-islington
Copy link
Contributor

Thanks@carljm for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@carljmcarljm deleted the fixperfmaptest branchMay 23, 2023 22:04
@bedevere-bot
Copy link

GH-104823 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelMay 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 23, 2023
…ss (pythonGH-104811)(cherry picked from commite0b3078)Co-authored-by: Carl Meyer <carl@oddbird.net>
carljm added a commit that referenced this pull requestMay 23, 2023
…ess (GH-104811) (#104823)gh-103295: fix stack overwrite on 32-bit in perf map test harness (GH-104811)(cherry picked from commite0b3078)Co-authored-by: Carl Meyer <carl@oddbird.net>
hrnciar added a commit to fedora-python/cpython that referenced this pull requestMay 24, 2023
…GH-104811) (python#104823)pythongh-103295: fix stack overwrite on 32-bit in perf map test harness (pythonGH-104811)(cherry picked from commite0b3078)Co-authored-by: Carl Meyer <carl@oddbird.net>
hrnciar pushed a commit to fedora-python/cpython that referenced this pull requestMay 24, 2023
facebook-github-bot pushed a commit to facebookincubator/cinder that referenced this pull requestMay 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: carljmDifferential Revision: D46041553fbshipit-source-id: 6502189f489ca6cf11949ecd93c044e5ebe4fd2c
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull requestJun 3, 2023
https://build.opensuse.org/request/show/1090558by 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 herehttps://docs.python.org/dev/whatsnew/changelog.html#python-3-12-0-beta-1
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pablogsalpablogsalAwaiting requested review from pablogsal

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@carljm@hroncok@miss-islington@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp