-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
bpo-29505: Fix interpreter in fuzzing targets to be relocatable #13907
Conversation
Hi. Thank you for the pull request. I left a comment about the change. |
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.
good catch!
Thanks @ammaraskar for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
GH-13914 is a backport of this pull request to the 3.8 branch. |
…onGH-13907) (cherry picked from commit a15a7bc) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
GH-13915 is a backport of this pull request to the 3.7 branch. |
Trying to get python fully checked into oss-fuzz, see google/oss-fuzz#2493 and the abandoned google/oss-fuzz#731
One of the concerns in the old pull request was that the python build will be moved from the
--prefix
it is installed in to another directory. This was causing the fuzz targets (which are essentially just programs with embedded python interpreters) to throw:As it turns out the fuzz targets were missing a call to
Py_SetProgramName
which is what _testembed.c does. I am not an expert in the import machinery at all but I'm assuming thePy_SetProgramName
call is essential to setting up the right prefixes internally as the docs somewhat suggest:If so, the docs can probably be improved in this regard.
Potential reviewers: @gpshead @alex (skip-news label can be applied)
https://bugs.python.org/issue29505