This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Two bugs in unix64.S


----- Original Message -----
> completely. My guess is that any project that has, so far, needed the
> feature has found out by trial-and-error that ffi_call() does *not*
> fill it completely (e.g. by running it on win32, or by noticing the
> wrong sign- vs. zero-extension done by unix64), and just assumed that
> only the lower bits are valid. I suppose it can be fixed in the
> various .S files supporting ffi_call(); I can try to propose tests to
> cover this case, and a patch for unix64.S and possibly win32.S.

Indeed. For instance, in Firefox we immediately cast the ffi_arg value back to the native size and discard the irrelevant bits. Other client code might not do this, so it's probably a good idea to fix the implementations...

Regards,
Dan.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]