diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2010-10-01 09:31:49 +0200 |
|---|---|---|
| committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-10-01 09:31:49 +0200 |
| commit | 731fc5f040ae78d2bedb8caed5e5f6c15e8071d1 (patch) | |
| tree | cb68ecf8788e12e49305ed8b8af678fb3921a2e1 /libffi/src | |
| parent | 16045c71e76e48153446fe2d4b59c6c1b482e3ac (diff) | |
| download | gcc-731fc5f040ae78d2bedb8caed5e5f6c15e8071d1.tar.gz gcc-731fc5f040ae78d2bedb8caed5e5f6c15e8071d1.tar.bz2 gcc-731fc5f040ae78d2bedb8caed5e5f6c15e8071d1.zip | |
re PR libffi/45677 (Bad stack allocation for ffi function calls on x86-64)
PR libffi/45677
* src/x86/ffi64.c (ffi_prep_cif_machdep): Ensure cif->bytes is
a multiple of 8.
* testsuite/libffi.call/many2.c: New test.
From-SVN: r164829
Diffstat (limited to 'libffi/src')
| -rw-r--r-- | libffi/src/x86/ffi64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libffi/src/x86/ffi64.c b/libffi/src/x86/ffi64.c index 07a2627b1f2..340b8d0f4bb 100644 --- a/libffi/src/x86/ffi64.c +++ b/libffi/src/x86/ffi64.c @@ -378,7 +378,7 @@ ffi_prep_cif_machdep (ffi_cif *cif) if (align < 8) align = 8; - bytes = ALIGN(bytes, align); + bytes = ALIGN (bytes, align); bytes += cif->arg_types[i]->size; } else @@ -390,7 +390,7 @@ ffi_prep_cif_machdep (ffi_cif *cif) if (ssecount) flags |= 1 << 11; cif->flags = flags; - cif->bytes = bytes; + cif->bytes = ALIGN (bytes, 8); return FFI_OK; } |
