Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue22821

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Argument of wrong type is passed to fcntl()
Type:behaviorStage:resolved
Components:Extension ModulesVersions:Python 3.4, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: brett.cannon, python-dev, serhiy.storchaka
Priority:normalKeywords:patch

Created on2014-11-08 14:54 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
fcntl_arg_type.patchserhiy.storchaka,2014-11-08 15:15review
Messages (5)
msg230861 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-11-08 14:54
Arguments of wrong type is passed to C function fcntl() in the fcntl module.Third argument of fcntl() should be either pointer to binary structure or C int. But C long is passed instead. All works on platforms where sizeof(long) == sizeof(int) or on little-endian platforms, but on big-endian platform with sizeof(long) != sizeof(int) this will pass wrong value.
msg230863 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-11-08 15:15
Here is a patch. It is much easier than I expected.
msg230929 -(view)Author: Brett Cannon (brett.cannon)*(Python committer)Date: 2014-11-10 01:25
Fixed in 3.5 as part of6e6532d313a1 as it was easier to integrate it as part of the Clinic patch.
msg230945 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-11-10 09:29
New changeset61e99438c237 by Serhiy Storchaka in branch '2.7':Issue#22821: Fixed fcntl() with integer argument on 64-bit big-endianhttps://hg.python.org/cpython/rev/61e99438c237New changeset45e8aed69767 by Serhiy Storchaka in branch '3.4':Issue#22821: Fixed fcntl() with integer argument on 64-bit big-endianhttps://hg.python.org/cpython/rev/45e8aed69767New changeset2d203a0b7908 by Serhiy Storchaka in branch 'default':Issue#22821: Fixed fcntl() with integer argument on 64-bit big-endianhttps://hg.python.org/cpython/rev/2d203a0b7908
msg230946 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-11-10 09:31
> Fixed in 3.5 as part of6e6532d313a1 as it was easier to integrate it as> part of the Clinic patch.6e6532d313a1 has introduced other bug ("l" was parsed to int). Changed to "I" for reasons described in the comment in fcntl_ioctl_impl().
History
DateUserActionArgs
2022-04-11 14:58:10adminsetgithub: 67010
2014-11-10 09:33:08serhiy.storchakasetstatus: open -> closed
assignee:serhiy.storchaka
stage: commit review -> resolved
resolution: fixed
versions: + Python 3.5
2014-11-10 09:31:58serhiy.storchakasetmessages: +msg230946
2014-11-10 09:29:54python-devsetnosy: +python-dev
messages: +msg230945
2014-11-10 01:25:30brett.cannonsetstage: patch review -> commit review
messages: +msg230929
versions: - Python 3.5
2014-11-08 15:15:20serhiy.storchakasetfiles: +fcntl_arg_type.patch
keywords: +patch
messages: +msg230863

stage: needs patch -> patch review
2014-11-08 14:54:38serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp