Skip to content
Snippets Groups Projects
Commit e963c038 authored by Antonio Terceiro's avatar Antonio Terceiro
Browse files

Fix ppc64el

parent 74d0e2b3
Branches
Tags
No related merge requests found
ruby-ffi (1.9.3debian-3) UNRELEASED; urgency=medium
* debian/tests/control: also run test suite with
gem2deb-test-runner --autopkgtest
- needed to add './' to spec file glob in debian/ruby-tests.rb
* debian/tests/control: also run test suite with
gem2deb-test-runner --autopkgtest
- needed to add './' to spec file glob in debian/ruby-tests.rb
* Add patch by Anurag Gupta <anurag@linux.vnet.ibm.com> from Ubuntu that
fixes call to functions with float/double variadic arguments. This should
fix ruby-ffi on ppc64el, _and_ be harmless for other architectures.
(debian/patches/fix-for-variadic-float-double-values.diff)
-- Antonio Terceiro <terceiro@debian.org> Sun, 24 Aug 2014 10:40:11 -0300
......
Description: Fix for failing float/double variadic args test cases in ruby-ffi package
This patch will fix the problem of passing float/double values as part of variadic
argument list from ruby-ffi package. All the test cases related to float/double arguments
passed as part of ruby variadic list were failing on ppc64le arch. Problem was due to
incorrect way to call C method ffi_prep_cif_var, where third argument was passed as total
number of arguments instead of fixed number of arguments
Author: Anurag Gupta <anurag@linux.vnet.ibm.com>
---
--- ruby-ffi-1.9.3debian.orig/ext/ffi_c/Variadic.c
+++ ruby-ffi-1.9.3debian/ext/ffi_c/Variadic.c
@@ -170,7 +170,7 @@ variadic_invoke(VALUE self, VALUE parame
ffi_type* ffiReturnType;
Type** paramTypes;
VALUE* argv;
- int paramCount = 0, i;
+ int paramCount = 0, fixedCount = 0, i;
ffi_status ffiStatus;
rbffi_frame_t frame = { 0 };
@@ -229,8 +229,12 @@ variadic_invoke(VALUE self, VALUE parame
if (ffiReturnType == NULL) {
rb_raise(rb_eArgError, "Invalid return type");
}
+
+ /*Get the number of fixed args from @fixed array*/
+ fixedCount = RARRAY_LEN(rb_iv_get(self, "@fixed"));
+
#ifdef HAVE_FFI_PREP_CIF_VAR
- ffiStatus = ffi_prep_cif_var(&cif, invoker->abi, paramCount, paramCount, ffiReturnType, ffiParamTypes);
+ ffiStatus = ffi_prep_cif_var(&cif, invoker->abi, fixedCount, paramCount, ffiReturnType, ffiParamTypes);
#else
ffiStatus = ffi_prep_cif(&cif, invoker->abi, paramCount, ffiReturnType, ffiParamTypes);
#endif
disable-rake-compiler.patch
mip64el.patch
arm64.patch
fix-for-variadic-float-double-values.diff
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment