hnswlib 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7017404c84c76bfd6922f7b49734e9d9b4c2c966b35a0911c88e137ca17cc43
4
- data.tar.gz: 7d8050815aa00860ae4a9d73544743260434648b1bd19167c71df5f621850609
3
+ metadata.gz: 3ddc5b6403c5ccc256534c136ff544c8e7e68fc4914cc894c1a28e56e57e139a
4
+ data.tar.gz: e503e0f85d3eefc5cf49f6ab5a21598f5b4205dc81bfd115e9d6ed4ab8bb4451
5
5
  SHA512:
6
- metadata.gz: aac29e5363178d72b0cad6aa8e1f6d1c3bc9fe913ca39c53e2cae58cbbf060da4df5fae32b2d0f3e2e0de0b87beb07958c11e226d40310970cba81115aa277ef
7
- data.tar.gz: f3a8016da1e968ef30309ed86c9a2f76e1d31281f02aafbc17ce47c3290041adb70a7705c243313260e832aaca691148fe2b4cb9fa5f04760b6dd2f53a53f420
6
+ metadata.gz: 197eb7d2d6b8319205b093413f13b28a5463106695f2f262d37a7de726fe09464e5389c230ddd4f9fa389d6ede077b0c9b643dd748c12467e6181cc3dd71ef06
7
+ data.tar.gz: 85ce6f7cce53275908c46cbaa5d341608096607433888c3ba78af03f3737c40eb2ba1c7f10753bdb128cdeabdd49bd82ef19c0d22c0cfcb85ffc0fa47aa3de6b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [[0.9.3](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.2...v0.9.3)] - 2026-02-17
2
+
3
+ - Fix to access map entry before erasing to prevent use-after-erase segmentation fault.
4
+
1
5
  ## [[0.9.2](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.1...v0.9.2)] - 2026-02-16
2
6
 
3
7
  - Remove libstdc++ loading check from native extensions build step.
@@ -695,7 +695,6 @@ private:
695
695
  return Qnil;
696
696
  }
697
697
 
698
- hnswlib::SpaceInterface<float>* space;
699
698
  if (strcmp(StringValueCStr(kw_values[0]), "l2") == 0) {
700
699
  rb_iv_set(self, "@space", rb_funcall(rb_const_get(rb_mHnswlib, rb_intern("L2Space")), rb_intern("new"), 1, kw_values[1]));
701
700
  } else {
@@ -92,9 +92,9 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
92
92
  return;
93
93
  }
94
94
 
95
+ size_t cur_c = found->second;
95
96
  dict_external_to_internal.erase(found);
96
97
 
97
- size_t cur_c = found->second;
98
98
  labeltype label = *((labeltype*)(data_ + size_per_element_ * (cur_element_count-1) + data_size_));
99
99
  dict_external_to_internal[label] = cur_c;
100
100
  memcpy(data_ + size_per_element_ * cur_c,
@@ -3,7 +3,7 @@
3
3
  # Hnswlib.rb provides Ruby bindings for the Hnswlib.
4
4
  module Hnswlib
5
5
  # The version of Hnswlib.rb you install.
6
- VERSION = '0.9.2'
6
+ VERSION = '0.9.3'
7
7
 
8
8
  # The version of Hnswlib included with gem.
9
9
  HSWLIB_VERSION = '0.8.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hnswlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku