efficient / libcuckoo

A high-performance, concurrent hash table
Other
1.61k stars 275 forks source link

Error during expansion when compiling with _GLIBCXX_DEBUG #24

Closed mikolmogorov closed 8 years ago

mikolmogorov commented 8 years ago

I was trying to debug my own code and faced with this error. If I compile in debug mode with _GLIBCXX_DEBUG enabled, it throws an error during hash table insertion, when it causes expansion. I managed to reproduce it with "count_freq.cc" example:

First, i've changed line 18 to

typedef cuckoohash_map<KeyType, size_t> Table;

and commented out line 15 to ease the building process. I compile it with:

g++ count_freq.cc -I../src/ -pthread -std=c++11 -g -Og -D_GLIBCXX_DEBUG -o count_freq

and when I run the binary, it terminates with:

/usr/include/c++/5.3.1/debug/array:152:error: attempt to subscript container with out-of-bounds index 1, but container only holds 1 elements.

However, the non-debug version seems to be running fine. I'm using GCC version 5.3.1, fedora linux 4.4.9-300.

manugoyal commented 8 years ago

Thanks! Just fixed in 6054fa7cbe16d829443281af54368ba43180aec1.