mirror of
https://github.com/python/cpython
synced 2026-09-29 11:30:29 +03:00
bpo-38748: Add ctypes test for stack corruption due to misaligned arguments (GH-26204)
This commit is contained in:
parent
85752decbf
commit
d79dd929ac
2 changed files with 26 additions and 0 deletions
|
|
@ -1034,6 +1034,19 @@ EXPORT (HRESULT) KeepObject(IUnknown *punk)
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef MS_WIN32
|
||||
|
||||
// i38748: c stub for testing stack corruption
|
||||
// When executing a Python callback with a long and a long long
|
||||
|
||||
typedef long(__stdcall *_test_i38748_funcType)(long, long long);
|
||||
|
||||
EXPORT(long) _test_i38748_runCallback(_test_i38748_funcType callback, int a, int b) {
|
||||
return callback(a, b);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static struct PyModuleDef_Slot _ctypes_test_slots[] = {
|
||||
{0, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue