Hi everyone,
I'd like to draw you attention to an bizarre issue I am experiencing: https://stackoverflow.com/q/49282888/1672565
Synopsis: I am experimenting with a DLL written in C and callback functions written in Python. I am working with mingw (32 bit) on top of 64 bit Linux for compiling the DLL. For running the DLL and the Python script, I am using an official 32 bit release build of CPython 3.5.3 for Windows on top of 32 bit *Wine* 2.18. My DLL contains a for-loop, which calls a call-back function in the Python script once per iteration. For some really odd reason, the for loop breaks early after a fluctuating, non-deterministic number of loops. The function containing the loop continues to run as if nothing happened. For more details and code examples please have a look at the question I posted as SO.
Apparently, my issue is not reproducible on Windows - at least comments suggest that - so there is a chance that this is related to Wine. Thanks for any help.
Best regards, Sebastian
Hi,
Am 14.03.2018 um 10:43 schrieb Sebastian M. Ernst ernst@pleiszenburg.de:
Hi everyone,
I'd like to draw you attention to an bizarre issue I am experiencing: https://stackoverflow.com/q/49282888/1672565 https://stackoverflow.com/q/49282888/1672565
The calling convention mismatch that is explained in the comments sounds like a good guess to me because CDECL and STDCALL have different ideas on who cleans up the stack. The value of 'i' will be pushed to the stack before the call, but both conveyor_belt (because it is STDCALL) and the caller (because it thinks conveyor_belt is CDECL) will pop the call arguments, and eventually you'll pop something into i that is larger than len.