Title: `_imp.get_frozen_object` possible incorrect use of `PyBUF_READ` · Issue #114685 · python/cpython · GitHub
Open Graph Title: `_imp.get_frozen_object` possible incorrect use of `PyBUF_READ` · Issue #114685 · python/cpython
X Title: `_imp.get_frozen_object` possible incorrect use of `PyBUF_READ` · Issue #114685 · python/cpython
Description: Bug report It is documented that PyBUF_READ should be used with memoryview objects. But, it is used in PyObject_GetBuffer: cpython/Python/import.c Line 3547 in 5ecfd75 if (PyObject_GetBuffer(dataobj, &buf, PyBUF_READ) != 0) { Other simil...
Open Graph Description: Bug report It is documented that PyBUF_READ should be used with memoryview objects. But, it is used in PyObject_GetBuffer: cpython/Python/import.c Line 3547 in 5ecfd75 if (PyObject_GetBuffer(dataob...
X Description: Bug report It is documented that PyBUF_READ should be used with memoryview objects. But, it is used in PyObject_GetBuffer: cpython/Python/import.c Line 3547 in 5ecfd75 if (PyObject_GetBuffer(dataob...
Opengraph URL: https://github.com/python/cpython/issues/114685
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`_imp.get_frozen_object` possible incorrect use of `PyBUF_READ`","articleBody":"# Bug report\n\nIt is documented that `PyBUF_READ` should be used with `memoryview` objects. But, it is used in `PyObject_GetBuffer`:\n\nhttps://github.com/python/cpython/blob/5ecfd750b4f511f270c38f0d748da9cffa279295/Python/import.c#L3547\n\nOther similar places that access `.buf` and `.len` just use `PyBUF_SIMPLE`, which I think we should use here as well.\n\nI will send a PR.\n\nOriginally found by @serhiy-storchaka in https://github.com/python/cpython/pull/114669#issuecomment-1913600699\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-114686\n* gh-114700\n* gh-114701\n* gh-114707\n* gh-114802\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2024-01-28T19:17:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/114685/cpython/issues/114685"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4d87749c-53be-14e9-8426-99f0133c58cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B16A:120E60:AA9DC:F264B:696A0A7D |
| html-safe-nonce | 49ba4ceb3ba69cb38d007b04e42560e4112b3d0021036dda8721b33459b0be48 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTZBOjEyMEU2MDpBQTlEQzpGMjY0Qjo2OTZBMEE3RCIsInZpc2l0b3JfaWQiOiI3Njk4NDUzNDIyMTIxMDI4MjIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9ae1ec6fc8e6a6a06fe1f17a7e4a7c8219b6e1a9104f3d0a399110d4d0e767d1 |
| hovercard-subject-tag | issue:2104310475 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/114685/issue_layout |
| twitter:image | https://opengraph.githubassets.com/437e8fead83230d31fd56b604f86a445e3ca3f6d025d6a1cdf703b00f7dafc02/python/cpython/issues/114685 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/437e8fead83230d31fd56b604f86a445e3ca3f6d025d6a1cdf703b00f7dafc02/python/cpython/issues/114685 |
| og:image:alt | Bug report It is documented that PyBUF_READ should be used with memoryview objects. But, it is used in PyObject_GetBuffer: cpython/Python/import.c Line 3547 in 5ecfd75 if (PyObject_GetBuffer(dataob... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sobolevn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7266b2d935baa1c6474b16dd9feaa5ca30607261 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width