[DRE-commits] [SCM] ruby-ffi.git branch, master, updated. debian/1.0.11debian-4-1-ga15942e
Antonio Terceiro
terceiro at debian.org
Sat Aug 4 19:50:58 UTC 2012
The following commit has been merged in the master branch:
commit a15942e4f9dd6d2066398e09860d6be54914e342
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sat Aug 4 16:44:25 2012 -0300
Fix call to variadic functions (Closes: #656809)
diff --git a/debian/changelog b/debian/changelog
index 8d86c77..bf33afe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+ruby-ffi (1.0.11debian-5) unstable; urgency=low
+
+ * debian/patches/0001-Fix-call-to-variadic-functions.patch: fixes calls to
+ variadic functions with floating point arguments, which currently only
+ breaks on armhf (Closes: #656809), but would also break on other
+ architectures with similar ABI for variadic functions.
+
+ -- Antonio Terceiro <terceiro at debian.org> Sat, 04 Aug 2012 16:42:56 -0300
+
ruby-ffi (1.0.11debian-4) unstable; urgency=low
* Bump standards version
diff --git a/debian/patches/0001-Fix-call-to-variadic-functions.patch b/debian/patches/0001-Fix-call-to-variadic-functions.patch
new file mode 100644
index 0000000..836211d
--- /dev/null
+++ b/debian/patches/0001-Fix-call-to-variadic-functions.patch
@@ -0,0 +1,36 @@
+From ef717f8e16e5d20ad376ed99d11780bacacff16f Mon Sep 17 00:00:00 2001
+From: Antonio Terceiro <terceiro at softwarelivre.org>
+Date: Sat, 4 Aug 2012 16:30:17 -0300
+Subject: [PATCH] Fix call to variadic functions
+
+This changes the call to ffi_prep_cif into a call to ffi_prep_cif_var,
+which is the improved libffi API for calling variadic functions.
+
+Calling variadic functions with floating point arguments with
+ffi_prep_cif currently only breaks in armhf, but could also break on
+other architectures where the ABI for variadic functions is different
+from what you would expect.
+
+For more information, please check the following message to the libffi
+development mailing list:
+http://permalink.gmane.org/gmane.comp.lib.ffi.general/277
+---
+ ext/ffi_c/Variadic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/ffi_c/Variadic.c b/ext/ffi_c/Variadic.c
+index ec5caf4..65b4dd6 100644
+--- a/ext/ffi_c/Variadic.c
++++ b/ext/ffi_c/Variadic.c
+@@ -219,7 +219,7 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
+ if (ffiReturnType == NULL) {
+ rb_raise(rb_eArgError, "Invalid return type");
+ }
+- ffiStatus = ffi_prep_cif(&cif, invoker->abi, paramCount, ffiReturnType, ffiParamTypes);
++ ffiStatus = ffi_prep_cif_var(&cif, invoker->abi, paramCount, paramCount, ffiReturnType, ffiParamTypes);
+ switch (ffiStatus) {
+ case FFI_BAD_ABI:
+ rb_raise(rb_eArgError, "Invalid ABI specified");
+--
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index eda2407..fc47754 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
fix-test-on-sparc
ftbfs-gcc-4.7.diff
disable-rake-compiler.patch
+0001-Fix-call-to-variadic-functions.patch
--
ruby-ffi.git
More information about the Pkg-ruby-extras-commits
mailing list