New submission from Steve Dower:

The ffi_prep_args function in libffi_msvc/ffi.c needs the attached patch to 
handle 64-bit parameters with the correct padding.

Without this patch, garbage may appear in the top part of 64-bit arguments as 
the values are not zeroed out by the memcpy.

I'm not 100% sure who 'owns' this file - is there an upstream project that 
should get the patch rather than Python? If not, I see no reason not to check 
this in now, even though it doesn't seem to repro with the VC10 builds.

components: ctypes
files: ffi_prep_args.patch
keywords: patch
messages: 230036
nosy: amaury.forgeotdarc, belopolsky, meador.inge, steve.dower
priority: normal
severity: normal
stage: patch review
status: open
title: MSVC ffi_prep_args doesn't handle 64-bit arguments properly
versions: Python 3.5
Added file:

Python tracker <>
Python-bugs-list mailing list

Reply via email to