Giter Club home page Giter Club logo

bitset's People

Contributors

brendon9x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitset's Issues

Segfault during GC

I'm struggling with this one. I'm getting these errors exclusively in the app I'm trying to use it with:

(gdb) backtrace
#0 0x00007fff81f63616 in __kill ()
#1 0x00007fff82003cca in abort ()
#2 0x00007fff81f1b6f5 in free ()
#3 0x00000001007b855a in bitset_free (bs=0x10756b280) at bitset.c:28
#4 0x000000010003aead in run_final (obj=4384258840) at gc.c:1955
#5 0x000000010003aede in finalize_list (p=0x105527b18) at gc.c:1097

...

I've been starting at the code for an hour and bashing it from every angle, but it refuses to die under any spec I write.

Any ideas?

Some operations don't disregard out of range bits...

a = Bitset.new(7)
b = ~Bitset.new(7)
a.hamming(b) #=> 64

The problem is that internally the representation is always some number of 64-bit integers, and so unless we explicitly mask out the bits that exist above the actual content bits, it's easy for them to affect operations.

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.