You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
please check the cast to size_t(1 << key_size_) in the resizing of the dynamic bitset in lsh_table.h + dynamic_bitset.h. I guess, the result of the expression 1 << 31 is interpreted as a signed integer result (32bit). Then the result ist casted to 64bit and then reinterpreted as unsigned 64 bit integer, which is done by addding UINTMAX+1. But UINTMAX is now defined for 64 bit integers resulting in very large numbers.
The result is 18446744071562067968 instead of the expected 2147483648 (256 MB), which causes a bad alloc in the dynamic bitset resize function. A cast to unsigned int instead of size_t would fix this problem for me...
Nevertheless: Great library :)
The text was updated successfully, but these errors were encountered:
Hello,
please check the cast to size_t(1 << key_size_) in the resizing of the dynamic bitset in lsh_table.h + dynamic_bitset.h. I guess, the result of the expression 1 << 31 is interpreted as a signed integer result (32bit). Then the result ist casted to 64bit and then reinterpreted as unsigned 64 bit integer, which is done by addding UINTMAX+1. But UINTMAX is now defined for 64 bit integers resulting in very large numbers.
The result is 18446744071562067968 instead of the expected 2147483648 (256 MB), which causes a bad alloc in the dynamic bitset resize function. A cast to unsigned int instead of size_t would fix this problem for me...
Nevertheless: Great library :)
The text was updated successfully, but these errors were encountered: