Skip to content

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
python:mainfrom
zenbooster:main
Closed

gh-95380: Removing the 1024 bytes limit in the fcntl_fcntl_impl and fcntl_ioctl_impl functions.#95439
zenbooster wants to merge 9 commits into
python:mainfrom
zenbooster:main

Conversation

@zenbooster
Copy link
Copy Markdown

@zenbooster zenbooster commented Jul 29, 2022

Also, in the fcntl_ioctl_impl function, I removed adding zero to the end of the parameter for ioctl. Removed - works.

@ghost
Copy link
Copy Markdown

ghost commented Jul 29, 2022

The following commit authors need to sign the Contributor License Agreement:

Click the button to sign:
CLA not signed

@bedevere-bot
Copy link
Copy Markdown

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.
Comment thread Modules/fcntlmodule.c
PyErr_SetString(PyExc_ValueError,
"ioctl string arg too long");

PyObject *o = PyBytes_FromStringAndSize(NULL, len);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Comment thread Modules/fcntlmodule.c
}
else {
ret = ioctl(fd, code, arg);
PyObject *o = PyBytes_FromStringAndSize(NULL, len);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".
@bedevere-bot
Copy link
Copy Markdown

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`
@zenbooster
Copy link
Copy Markdown
Author

Ah, now I know how to do it... Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants