[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-11-15 Thread Michael Curran
Michael Curran added the comment: PR: https://github.com/python/cpython/pull/26204 Looks like a maintainer needs to allow a workflow to run for the remaining checks. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-11-15 Thread Michael Curran
Michael Curran added the comment: As requested, I created a pr which adds a test to show the crash. It is marked as expected failure on 32 bit (x86) and runs successfully as expected on x64. What would be the next steps in moving this issue forward? I don't think I have the knowledge

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-04-14 Thread Michael Curran
Michael Curran added the comment: This bug is reproduceable on both Python 3.8 and 3.9. But not 3.7. Ths bug is seen in the real world, in the context of providing Python callbacks to Win32 API functions, or when implementing comtypes COM objects in Python. For example, we see this crash

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-04-14 Thread Michael Curran
Michael Curran added the comment: I can also reproduce this. I will attach my own testcase below. So far I see it when the callback is __stdcall (WINFUNCTYPE) and it takes an larger than 4 bytes (E.g. a long long or a VARIANT), with one or more arguments preceeding it such that this argument

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-11 Thread Michael Curran
Michael Curran m...@nvaccess.org added the comment: Tested on Windows 7 x64, with Python 2.7 rc1 [amd64]: both examples work fine. So it seems the issue is specific to x86. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-10 Thread Michael Curran
New submission from Michael Curran m...@nvaccess.org: There seem to be problems with WINFUNCTYPE callbacks causing exceptions, and or getting their return value ignored by the caller, when using Python 2.7 rc1. Two examples provided. Example 1: Providing a WINFUNCTYPE wrapped python function

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-10 Thread Michael Curran
Changes by Michael Curran m...@nvaccess.org: Added file: http://bugs.python.org/file17605/test_keyHook.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-10 Thread Michael Curran
Michael Curran m...@nvaccess.org added the comment: I should also note that this has been tested on Windows 7 and XP (32 bit). I have also seen cases where Python has crashed completely, rather than just causing a WindowsError, in these circomstances

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-10 Thread Michael Curran
Michael Curran m...@nvaccess.org added the comment: The issue does not occure with Python 2.7 beta 1, but does occure in Python 2.7 beta 2. So, with this in mind, its probably more likely that it may have been caused by the following change: - On Windows, ctypes does no longer check the stack