[issue16865] ctypes arrays >=2GB in length causes exception

2018-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is specific to system with 32-bit long but 64-bit size_t. Yes, seems the only supported impacted system is Windows. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue16865] ctypes arrays >=2GB in length causes exception

2018-12-04 Thread STINNER Victor
STINNER Victor added the comment: > The environment is Windows 8 Pro 64-bit running Python 64-bit in the > WinPython distribution. This issue is specific to system with 32-bit long but 64-bit void* I guess? So only Windows is impacted? -- nosy: +vstinner

[issue16865] ctypes arrays >=2GB in length causes exception

2018-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 93d7918f77278f973a4a106c1d01ad2d9805816d by Serhiy Storchaka in branch '2.7': [2.7] bpo-16865: Support arrays >=2GB in ctypes. (GH-3006). (GH-7441) https://github.com/python/cpython/commit/93d7918f77278f973a4a106c1d01ad2d9805816d --

[issue16865] ctypes arrays >=2GB in length causes exception

2018-06-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7068 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16865] ctypes arrays >=2GB in length causes exception

2018-05-14 Thread miss-islington
miss-islington added the comment: New changeset 726894addc02effaa369fded3caaba94875c1f3d by Miss Islington (bot) in branch '3.6': bpo-16865: Support arrays >=2GB in ctypes. (GH-3006)

[issue16865] ctypes arrays >=2GB in length causes exception

2018-05-14 Thread miss-islington
miss-islington added the comment: New changeset 2ce72e243fbc0e4f07f1191b20be548bfa5cbe11 by Miss Islington (bot) in branch '3.7': bpo-16865: Support arrays >=2GB in ctypes. (GH-3006)

[issue16865] ctypes arrays >=2GB in length causes exception

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6524 ___ Python tracker ___

[issue16865] ctypes arrays >=2GB in length causes exception

2018-05-14 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +6523 stage: needs patch -> patch review ___ Python tracker

[issue16865] ctypes arrays >=2GB in length causes exception

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 735abadd5bd91db4a9e6f4311969b0afacca0a1a by Serhiy Storchaka (Segev Finer) in branch 'master': bpo-16865: Support arrays >=2GB in ctypes. (GH-3006)

[issue16865] ctypes arrays >=2GB in length causes exception

2017-08-17 Thread Igor
Changes by Igor : -- nosy: +i3v ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16865] ctypes arrays >=2GB in length causes exception

2017-08-05 Thread Segev Finer
Changes by Segev Finer : -- pull_requests: +3040 ___ Python tracker ___ ___

[issue16865] ctypes arrays >=2GB in length causes exception

2017-05-10 Thread David Heffernan
David Heffernan added the comment: Erik, As you can no doubt guess, this is related to the questions I have been asking on SO that you have so expertly been answering. Thank you! When I solved the latest problem, getting at the internal buffer of a bytearray, I used the code in my previous

[issue16865] ctypes arrays >=2GB in length causes exception

2017-05-10 Thread Eryk Sun
Eryk Sun added the comment: In older versions of ctypes, before it was added to the standard library, the underlying length field was a C int, and CArrayType_new used the PyInt_AS_LONG macro. ctypes was added to the standard library in 2.5, by which time the length field is Py_ssize_t, but

[issue16865] ctypes arrays >=2GB in length causes exception

2017-05-10 Thread David Heffernan
David Heffernan added the comment: I just ran into this issue. I'm trying to write code like this: (ctypes.c_char*bufferLen).from_buffer(buffer) where buffer is a bytearray. When bufferLen is greater than 2GB I fail foul of this code in _ctypes.c long length; length =

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In _ctypes.c there are (only!) two occurrences of the long type... both are related to ctypes arrays and look suspect. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16865

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Jeffrey Bush
New submission from Jeffrey Bush: The environment is Windows 8 Pro 64-bit running Python 64-bit in the WinPython distribution. Python is v2.7.3 built on Apr 10 2012. I first found this with create_string_buffer however I found out that it happens with an even simpler example. The following

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Would you like to investigate a patch? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16865 ___

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Ezio Melotti
Ezio Melotti added the comment: Note that adding support for 2GB arrays is a new feature and therefore can't go in 2.7 (but it would be OK for 3.4+). The error message could be improved though. -- nosy: +amaury.forgeotdarc, belopolsky, ezio.melotti, meador.inge

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Jeffrey Bush
Jeffrey Bush added the comment: I have no idea where I would start and don't have much time... I am not so sure it is a new features. It seems that the ctypes system is internally using unsigned integers for length but should be using size_t (or at least ssize_t). Seems like a bug.

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Jeffrey Bush
Jeffrey Bush added the comment: I mean using signed integers currently. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16865 ___ ___

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Ezio Melotti
Ezio Melotti added the comment: If it works elsewhere and/or it's documented to work, then it might indeed considered a bug. Maybe someone more familiar with ctype can comment. -- ___ Python tracker rep...@bugs.python.org

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Jeffrey Bush
Jeffrey Bush added the comment: Okay, so I tested in Linux (CentOS 6.3) which has Python 2.6.6 64-bit. It works. So the Windows 2.7.3 64-bit version is bugged. I was able to perform the c_char * long(32*1024*1024*1024) [the highest value I tried] and it worked fine. The Linux machine I tested

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Meador Inge
Meador Inge added the comment: This case works fine on 64-bit Linux (Ubuntu) and OS X 10.7.5. I suspect this is due to the fact that 64-bit Windows uses the LLP64 data model and we are using longs somewhere. I am investigating further now. -- stage: - needs patch versions: +Python