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

Michael Curran report at bugs.python.org
Wed Apr 14 14:42:02 EDT 2021


Michael Curran <mick at nvaccess.org> 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 is not aligned on a multiple of 8 bytes. 
For example arguments can be:
* long, long long
* long, long, long, long long
But the corruption does not occur with something like:
* long, long, long long
My testcase uses long, long long to show the crash.

----------
nosy: +michaeldcurran
Added file: https://bugs.python.org/file49959/py3.8crash.zip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38748>
_______________________________________


More information about the Python-bugs-list mailing list