You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fcntl_ioctl still not 100% sane with unsigned longs #60328
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2012-10-04.03:46:54.896>labels= ['extension-modules', 'type-bug']
title='fcntl_ioctl still not 100% sane with unsigned longs'updated_at=<Date2015-02-15.10:00:39.805>user='https://github.com/ngie-eign'
As discussed in ID bpo-1471, the type for request is not 100% correct on some platforms (FreeBSD, NetBSD, and OpenBSD, for instance) and the custom platform that I'm using unfortunately uses non-32-bit int ioctls. An autoconf test needs to be added for these platforms and the request parameter needs to be handled properly (I'll take charge of doing that).
This looks as a duplicate of bpo-521723 and bpo-1471. Do you have tests that demonstrate a failure with using ioctl on OpenBSD? May be there are problems on 64-bit big-endian platforms (or even on 64-bit little-endian if additional parameters are passed to ioctl).
ngie-eign commented on Feb 15, 2015
ngie-eignmannequin
MannequinAuthor
More actions
Yes, it's a duplicate. That being said, documentation alone it should be unsigned long for Darwin (OS/X), FreeBSD, OpenBSD. Looking at the definition for ioctl(2), the below example would cause a failure.
I need to hunt around for a practical example as I don't have one offhand (it's something that was found a long time ago in a couple of python 2.6 at my current employer because they have ioctl's that go beyond the 32-bit boundary IIRC...)
ioctl_t _ioctl = ioctl;
fuji:~ ngie$ uname -a
Darwin fuji.local 13.4.0 Darwin Kernel Version 13.4.0: Wed Dec 17 19:05:52 PST 2014; root:xnu-2422.115.10~1/RELEASE_X86_64 x86_64
ngie-eign commented on Feb 15, 2015
ngie-eignmannequin
MannequinAuthor
More actions
Another note: mixed endianness might have been a factor as previous versions of the product that were shipped used bi-arch x86 (32-bit userland on 64-bit kernel.
Activity
ngie-eign commentedon Oct 4, 2012
As discussed in ID bpo-1471, the type for request is not 100% correct on some platforms (FreeBSD, NetBSD, and OpenBSD, for instance) and the custom platform that I'm using unfortunately uses non-32-bit int ioctls. An autoconf test needs to be added for these platforms and the request parameter needs to be handled properly (I'll take charge of doing that).
asvetlov commentedon Oct 5, 2012
Is it affected for 3.3 and 3.4 also?
ngie-eign commentedon Nov 11, 2012
Yes. Submitting a patch to fix this based on hg master shortly..
ngie-eign commentedon Nov 11, 2012
Ran 5 tests in 0.003s
OK
ngie-eign commentedon Nov 11, 2012
Sorry; previous patch is not applicable to this issue. This one is.
ngie-eign commentedon Nov 11, 2012
And I missed the int -> unsigned int part. Resubmitting one last time for tonight..
ngie-eign commentedon Nov 11, 2012
Grr... Let's try again.
ngie-eign commentedon Nov 11, 2012
... g'night.
serhiy-storchaka commentedon Feb 15, 2015
This looks as a duplicate of bpo-521723 and bpo-1471. Do you have tests that demonstrate a failure with using ioctl on OpenBSD? May be there are problems on 64-bit big-endian platforms (or even on 64-bit little-endian if additional parameters are passed to ioctl).
ngie-eign commentedon Feb 15, 2015
Yes, it's a duplicate. That being said, documentation alone it should be unsigned long for Darwin (OS/X), FreeBSD, OpenBSD. Looking at the definition for ioctl(2), the below example would cause a failure.
I need to hunt around for a practical example as I don't have one offhand (it's something that was found a long time ago in a couple of python 2.6 at my current employer because they have ioctl's that go beyond the 32-bit boundary IIRC...)
ioctl_t _ioctl = ioctl;
fuji:~ ngie$ uname -a
Darwin fuji.local 13.4.0 Darwin Kernel Version 13.4.0: Wed Dec 17 19:05:52 PST 2014; root:xnu-2422.115.10~1/RELEASE_X86_64 x86_64
ngie-eign commentedon Feb 15, 2015
Another note: mixed endianness might have been a factor as previous versions of the product that were shipped used bi-arch x86 (32-bit userland on 64-bit kernel.
serhiy-storchaka commentedon Apr 21, 2025
This was fixed in #69214. The documentation will be updated in #132742.