diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-28 06:29:50 +0000 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-28 06:29:50 +0000 |
commit | e257904f353d7cd9bd9119f089cd1ca47c73d6c7 (patch) | |
tree | 4dde0b16288284568e0113290157c08986a64484 | |
parent | 10507446389cff9b072c25aa86ba35834a786fe5 (diff) | |
download | txr-e257904f353d7cd9bd9119f089cd1ca47c73d6c7.tar.gz txr-e257904f353d7cd9bd9119f089cd1ca47c73d6c7.tar.bz2 txr-e257904f353d7cd9bd9119f089cd1ca47c73d6c7.zip |
ffi: bugfix: null out return value to padded size.
* ffi.c (ffi_closure_dispatch_safe): In the abort case
when we put zeros in the return value, we must overwrite
the entire ffi_arg cell, in adherence with the special
return value quirk of libffi.
-rw-r--r-- | ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2800,7 +2800,7 @@ static void ffi_closure_dispatch_safe(ffi_cif *cif, void *cret, if (rtft->release != 0 && retval != nao) rtft->release(rtft, retval, convert(mem_t *, cret)); if (!tfcl->abort_retval) - memset(cret, 0, rtft->size); + memset(cret, 0, pad_retval(rtft->size)); else ifbe2(rtft->rput, rtft->put)(rtft, tfcl->abort_retval, convert(mem_t *, cret), self); |