hyperloglog
hyperloglog copied to clipboard
Segfault if you offer an integer to HyperBuilder
Here's a simple repro:
builder = HyperBuilder.new(11)
builder.offer(4)
I would expect this to take "4" and record it as a value. That is, if I offer [1, 2, 3] to the builder I would expect to get an estimated cardinality of 3.
What actually happens is a segfault.
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]
Process: ruby [66977]
Path: /Users/USER/*/ruby
Identifier: ruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [9136]
Date/Time: 2012-11-16 17:08:32.339 -0800
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000009