Skip to content

Commit

Permalink
Test: Wrong buffer size caused illegal access
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Jul 30, 2023
1 parent 9131287 commit 830e280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void test_cosine(std::size_t collection_size, std::size_t dimensions) {
// Type-punned:
for (std::size_t connectivity : {3, 13, 50}) {
using index_t = index_dense_gt<key_t, slot_t>;
metric_punned_t metric(dimensions * sizeof(scalar_at), metric_kind_t::cos_k, scalar_kind<scalar_at>());
metric_punned_t metric(dimensions, metric_kind_t::cos_k, scalar_kind<scalar_at>());
index_config_t config(connectivity);
index_t index = index_t::make(metric, config);
test_cosine<true>(index, matrix);
Expand Down

0 comments on commit 830e280

Please sign in to comment.