gh-95380: Removing the 1024 bytes limit in the fcntl_fcntl_impl and fcntl_ioctl_impl functions.#95439
Closed
zenbooster wants to merge 9 commits into
Closed
gh-95380: Removing the 1024 bytes limit in the fcntl_fcntl_impl and fcntl_ioctl_impl functions.#95439zenbooster wants to merge 9 commits into
zenbooster wants to merge 9 commits into
Conversation
…ва разных варианта исправления.
…pl убрал buf[len] = '\0';
|
The following commit authors need to sign the Contributor License Agreement: |
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Пулл-реквест pythongh-95429 внёс по сути те же изменения, так что фокусируемся на отсутствующем там fcntl_ioctl_impl.
gst
reviewed
Jul 29, 2022
| PyErr_SetString(PyExc_ValueError, | ||
| "ioctl string arg too long"); | ||
|
|
||
| PyObject *o = PyBytes_FromStringAndSize(NULL, len); |
Contributor
There was a problem hiding this comment.
it's not decref in the failure/error code path(s)..
also on line 248 : could not you directly returns it instead of re-creating another object ?
| } | ||
| else { | ||
| ret = ioctl(fd, code, arg); | ||
| PyObject *o = PyBytes_FromStringAndSize(NULL, len); |
Contributor
There was a problem hiding this comment.
should not be decref/freed in some code path(s) below ?
Консольная команда, использованная для обновления:
python Tools/clinic/clinic.py Modules/fcntlmodule.c
Если этого не сделать, автоматическая проверка пулл-реквеста увидит
рассинхронизацию, и у пул-реквеста в статусах будет крестик напротив
"Tests / Check if generated files are up to date".
This was referenced Jul 29, 2022
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Remove `fcntl_fcntl_impl` keeping `fcntl_ioctl_impl`
Author
|
Ah, now I know how to do it... Fixed. |
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.
Also, in the fcntl_ioctl_impl function, I removed adding zero to the end of the parameter for ioctl. Removed - works.