Giter VIP home page Giter VIP logo

Comments (8)

jbrummack avatar jbrummack commented on June 22, 2024 1

I will look into it tomorrow, maybe this error happens with other functions too...

from usearch.

ashvardanian avatar ashvardanian commented on June 22, 2024 1

@MarkReedZ, check #413 🤗

from usearch.

ashvardanian avatar ashvardanian commented on June 22, 2024

Nice! Any chance you could open a PR?

from usearch.

jbrummack avatar jbrummack commented on June 22, 2024

Another reason for segfaults is trying to add to the index when its capacity is 0 (not reserving). This could also be checked in the add function.

from usearch.

ashvardanian avatar ashvardanian commented on June 22, 2024

This one is harder to justify as it's not a zero-cost change. The size is an atomic variable, and checking it from many threads would cause contention.

from usearch.

MarkReedZ avatar MarkReedZ commented on June 22, 2024

I'm taking a look at this. Currently the rust tests are failing on add.

test tests::test_add_remove_vector ... thread 'tests::test_add_remove_vector' panicked at rust/lib.rs:1434:9:
assertion failed: index.add(id2, &second).is_ok()

I added a test for the seg fault example however this passes for me.

index.add(row as u64, &[3, 5]); //2 is not 192 and causes a segfault

I've added tests for other permutations of add and have hit a hang.

from usearch.

MarkReedZ avatar MarkReedZ commented on June 22, 2024

I'm looking at an unrelated error and cleaning up the tests to be more rust idiomatic.

However, looking at the PR - are you suggesting fixing this in the base library by adding a size_t length argument to index::add then checking to ensure it matches options.dimensions? Or only fixing this for rust by updating rust/lib.cpp?

from usearch.

ashvardanian avatar ashvardanian commented on June 22, 2024

I meant changing only the rust/lib.cpp 🤗

from usearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.