DataSoft/Nova — Issue #79: SuspectTable Peek/Delete double free or corruption error
Author: PherricOxide
Created: 2012-03-09 22:12:27+00:00
State: open

Deleting the suspectTable after calling Peek on an invalid key causes a double free/corruption error. Contrived code to reproduce problem,

SuspectTable *test = new SuspectTable();
test->Peek(42);
delete test;

*** glibc detected *** /home/david/Code/Nova/Novad/Debug/Novad: double free or corruption (!prev): 0x08157250 ***

Stack track,

__kernel_vsyscall() at 0x130416
__GI_raise() at raise.c:64 0x2fbc8f
__GI_abort() at abort.c:92 0x2ff2b5
__libc_message() at libc_fatal.c:189 0x331dfc
malloc_printerr() at malloc.c:6,283 0x33cbc2
_int_free() at malloc.c:4,795 0x33d862
__GI___libc_free() at malloc.c:3,738 0x34094d
google::libc_allocator_with_realloc >::deallocate() at libc_allocator_with_realloc.h:67 0x8080e71
google::dense_hashtable, unsigned int, std::tr1::hash, google::dense_hash_map, eqaddr>::SelectKey, google::dense_hash_map, eqaddr>::SetKey, eqaddr, google::libc_allocator_with_realloc > >::~dense_hashtable() at densehashtable.h:731 0x80805a7
google::dense_hash_map, eqaddr, google::libc_allocator_with_realloc > >::~dense_hash_map() at dense_hash_map:119 0x8080279
Nova::FeatureSet::~FeatureSet() at FeatureSet.cpp:44 0x807dae1
Nova::Suspect::~Suspect() at Suspect.cpp:54 0x808e7ad
Nova::SuspectTable::~SuspectTable() at SuspectTable.cpp:49 0x8091b70
main() at Novad.cpp:116 0x805a610