ffi 1.17.0.rc1 → 1.17.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ea15fd47a8241bb9bab7086d46ac6bc6ac752c383dc748c616d298f742ed0d0
4
- data.tar.gz: 5253f331c7fea5590f4499133cac83dbeba5d833825339f4fc45cb57f0c94bcd
3
+ metadata.gz: 7442f86d48dd36654ca9c4f1579c4b4c151e0e74cb6fbe53b09357837a2a9851
4
+ data.tar.gz: a56f736bebf8ac565505bc97b15bbfc65270210e5e7ac8763f9eba4dde1cf441
5
5
  SHA512:
6
- metadata.gz: e42a6fc177d1302b64a07b6b93a20bf9e0ad4e692a7ab2c16f1f5fbf65ce795fe044187befdcc5859ecb8f3870acac3ca3b687e5e96773f448d0b16e6a1d7710
7
- data.tar.gz: 2efdb5b63defea13f90d5ec7a7f8c7fb85e3cab24fc84320c8e061017946687f0238a68a57375a4ce76aa67f041b6b65966170d4d98d5ed4cac4d1dbd3dc71df
6
+ metadata.gz: e0f9cd35b6ca6543525e15e82ef4d18934b0bb120cb46fc0ed6c60de99a014c124e3e12e0b5ca72a4582a398f624a59b993d990e05f67c21ed8511f7e759753a
7
+ data.tar.gz: d9054d9f0afd40c0b077dc0925a4af1b3959b871688d254d524850b185862a89eb10b05808043cf7a66095e41d0fd511b6b02a60ece240a1e9d48d406ec29cae
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
- 1.17.0.rc1 / 2024-04-07
1
+ 1.17.0.rc2 / 2024-04-22
2
+ -------------------
3
+
4
+ Fixed:
5
+ * Add missing write barriers to StructLayout#initialize causing a segfault with GC.stress. #1079
6
+
7
+
8
+ 1.17.0.rc1 / 2024-04-08
2
9
  -------------------
3
10
 
4
11
  Fixed:
@@ -183,7 +183,7 @@ fntype_initialize(int argc, VALUE* argv, VALUE self)
183
183
  Check_Type(rbParamTypes, T_ARRAY);
184
184
 
185
185
  TypedData_Get_Struct(self, FunctionType, &rbffi_fntype_data_type, fnInfo);
186
- fnInfo->parameterCount = (int) RARRAY_LEN(rbParamTypes);
186
+ fnInfo->parameterCount = RARRAY_LENINT(rbParamTypes);
187
187
  fnInfo->parameterTypes = xcalloc(fnInfo->parameterCount, sizeof(*fnInfo->parameterTypes));
188
188
  fnInfo->ffiParameterTypes = xcalloc(fnInfo->parameterCount, sizeof(ffi_type *));
189
189
  fnInfo->nativeParameterTypes = xcalloc(fnInfo->parameterCount, sizeof(*fnInfo->nativeParameterTypes));
@@ -460,9 +460,9 @@ struct_layout_allocate(VALUE klass)
460
460
  VALUE obj;
461
461
 
462
462
  obj = TypedData_Make_Struct(klass, StructLayout, &rbffi_struct_layout_data_type, layout);
463
- layout->rbFieldMap = Qnil;
464
- layout->rbFieldNames = Qnil;
465
- layout->rbFields = Qnil;
463
+ RB_OBJ_WRITE(obj, &layout->rbFieldMap, Qnil);
464
+ RB_OBJ_WRITE(obj, &layout->rbFieldNames, Qnil);
465
+ RB_OBJ_WRITE(obj, &layout->rbFields, Qnil);
466
466
  layout->base.ffiType = xcalloc(1, sizeof(*layout->base.ffiType));
467
467
  layout->base.ffiType->size = 0;
468
468
  layout->base.ffiType->alignment = 0;
@@ -487,14 +487,14 @@ struct_layout_initialize(VALUE self, VALUE fields, VALUE size, VALUE align)
487
487
  int i;
488
488
 
489
489
  TypedData_Get_Struct(self, StructLayout, &rbffi_struct_layout_data_type, layout);
490
- layout->fieldCount = (int) RARRAY_LEN(fields);
491
- layout->rbFieldMap = rb_hash_new();
492
- layout->rbFieldNames = rb_ary_new2(layout->fieldCount);
490
+ layout->fieldCount = RARRAY_LENINT(fields);
491
+ RB_OBJ_WRITE(self, &layout->rbFieldMap, rb_hash_new());
492
+ RB_OBJ_WRITE(self, &layout->rbFieldNames, rb_ary_new2(layout->fieldCount));
493
493
  layout->size = (int) FFI_ALIGN(NUM2INT(size), NUM2INT(align));
494
494
  layout->align = NUM2INT(align);
495
495
  layout->fields = xcalloc(layout->fieldCount, sizeof(StructField *));
496
496
  layout->ffiTypes = xcalloc(layout->fieldCount + 1, sizeof(ffi_type *));
497
- layout->rbFields = rb_ary_new2(layout->fieldCount);
497
+ RB_OBJ_WRITE(self, &layout->rbFields, rb_ary_new2(layout->fieldCount));
498
498
  layout->referenceFieldCount = 0;
499
499
  layout->base.ffiType->elements = layout->ffiTypes;
500
500
  layout->base.ffiType->size = layout->size;
data/ext/ffi_c/Variadic.c CHANGED
@@ -211,7 +211,7 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
211
211
  Check_Type(parameterValues, T_ARRAY);
212
212
 
213
213
  TypedData_Get_Struct(self, VariadicInvoker, &variadic_data_type, invoker);
214
- paramCount = (int) RARRAY_LEN(parameterTypes);
214
+ paramCount = RARRAY_LENINT(parameterTypes);
215
215
  paramTypes = ALLOCA_N(Type *, paramCount);
216
216
  ffiParamTypes = ALLOCA_N(ffi_type *, paramCount);
217
217
  params = ALLOCA_N(FFIStorage, paramCount);
data/lib/ffi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FFI
2
- VERSION = '1.17.0.rc1'
2
+ VERSION = '1.17.0.rc2'
3
3
  end
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- Eb8݄�֗�pKozI4 �y�Q:��(B��m���#m��2
2
- f.Qt-��p ����%N$������yZ��A:8R�~�L�����$j�=��A�Ň��|R{4�>\e!�����.A�W�Ŭ�ě�sq���Ī�MpC��I,?�Md޳�Ig#�q�7��$����߻hfE}��a�ppS�EK�bQd
1
+ !��XI��D]zfw��qW���9����
2
+ HЀ+��u������̟���C�;���V%^��HsJ4��} g���j��Q
3
+ �![��D?�`�Uy`%.��}���?���y)
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0.rc1
4
+ version: 1.17.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne Meissner
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
@@ -33,7 +32,7 @@ cert_chain:
33
32
  5wFER6XhvvLDFAMh/jMg+s7Wd5SbSHgHNSUaUGVtdWkVPOer6oF0aLdZUR3CETkn
34
33
  5nWXZma/BUd3YgYA/Xumc6QQqIS4p7mr
35
34
  -----END CERTIFICATE-----
36
- date: 2024-04-08 00:00:00.000000000 Z
35
+ date: 2024-04-22 00:00:00.000000000 Z
37
36
  dependencies:
38
37
  - !ruby/object:Gem::Dependency
39
38
  name: rake
@@ -749,7 +748,6 @@ metadata:
749
748
  wiki_uri: https://github.com/ffi/ffi/wiki
750
749
  source_code_uri: https://github.com/ffi/ffi/
751
750
  mailing_list_uri: http://groups.google.com/group/ruby-ffi
752
- post_install_message:
753
751
  rdoc_options:
754
752
  - "--exclude=ext/ffi_c/.*\\.o$"
755
753
  - "--exclude=ffi_c\\.(bundle|so)$"
@@ -766,8 +764,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
766
764
  - !ruby/object:Gem::Version
767
765
  version: '0'
768
766
  requirements: []
769
- rubygems_version: 3.5.3
770
- signing_key:
767
+ rubygems_version: 3.6.0.dev
771
768
  specification_version: 4
772
769
  summary: Ruby FFI
773
770
  test_files: []
metadata.gz.sig CHANGED
Binary file