Title: bpo-29505: Fix interpreter in fuzzing targets to be relocatable by ammaraskar · Pull Request #13907 · python/cpython · GitHub
Open Graph Title: bpo-29505: Fix interpreter in fuzzing targets to be relocatable by ammaraskar · Pull Request #13907 · python/cpython
X Title: bpo-29505: Fix interpreter in fuzzing targets to be relocatable by ammaraskar · Pull Request #13907 · python/cpython
Description: 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: Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' 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 the Py_SetProgramName call is essential to setting up the right prefixes internally as the docs somewhat suggest: This is derived through a number of complicated rules from the program name set with Py_SetProgramName() and some environment variables; " 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
Open Graph Description: 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 ...
X Description: 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 ...
Opengraph URL: https://github.com/python/cpython/pull/13907
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3d1cf57b-5733-5f97-7492-12541b77fe10 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EB18:11D6DE:2FB1DB:3F121A:6B02344C |
| html-safe-nonce | de1b3a78c439bdc97e3710a49d4a3fa352a9453180c860067855e739bd1f9414 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjE4OjExRDZERToyRkIxREI6M0YxMjFBOjZCMDIzNDRDIiwidmlzaXRvcl9pZCI6IjM5NjU0NTk0NjQxMzU1MjEzNTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6d12dbc1052ba78b2cb9f9c2f14b583e94689221470786da4289044f77b4591f |
| hovercard-subject-tag | pull_request:286378726 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/13907/files |
| twitter:image | https://avatars.githubusercontent.com/u/773529?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/773529?s=400&v=4 |
| og:image:alt | 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 ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width