Closed GoogleCodeExporter closed 9 years ago
Weird, I can actually test on a centos 5.5 box, and all the tests pass for me.
The HT_OCCUPANCY_PCT / 100.0f code should be ok -- the compiler will conver the
int to a float here -- though of course you could have some weird compiler
problem.
What happens when you run 'make check' -- do all the package tests pass?
Original comment by csilv...@gmail.com
on 20 Jan 2011 at 1:37
What steps will reproduce the problem?
1. Define a dense_hash_map object as part of a larger class definition.
2.
3.
What is the expected output? What do you see instead?
I expect the dense hash map to successfully compile and execute.
Compilation fails, due to a thrown "resize overflow" exception.
What version of the product are you using? On what operating system?
sparsehash-1.10
CentOS release 5.4 (Final)
gcc version 4.1.2 (Wind River VxWorks G++ DWARF-EH 4.1-181) -- cross-compiling
from x86 to PPC603
Please provide any additional information below.
Compilation and make check are fine when targeting the host system.
Compiling same code with cross-compiler causes issue.
Somewhat difficult to integrate the package tests into my build at the moment,
sorry...
It's triggering a huge number of compilation errors, and they're not likely all
to be legit issues.
Some things that appear to be in the resize exception area :
hashtable_test.cxx: In member function
'void<unnamed>::TEST_HashtableDeathTest_ResizeOverflow::Run()':
hashtable_test.cxx:1612: error: exception handling disabled, use -fexceptions
to enable
google/sparsehash/hashtable-common.h: In member function 'SizeType
sh_hashtable_settings<Key, HashFunc, SizeType,
HT_MIN_BUCKETS>::min_buckets(SizeType, SizeType) [with Key = int, HashFunc =
__gnu_cxx::hash<int>, SizeType = unsigned int, int HT_MIN_BUCKETS = 4]':
google/sparsehash/sparsehashtable.h:760: instantiated from
'google::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey,
Alloc>::sparse_hashtable(typename Alloc::rebind<Value>::other::size_type, const
HashFcn&, const EqualKey&, const ExtractKey&, const SetKey&, const Alloc&)
[with Value = int, Key = int, HashFcn = __gnu_cxx::hash<int>, ExtractKey =
google::sparse_hash_set<int, __gnu_cxx::hash<int>, std::equal_to<int>,
google::libc_allocator_with_realloc<int> >::Identity, SetKey =
google::sparse_hash_set<int, __gnu_cxx::hash<int>, std::equal_to<int>,
google::libc_allocator_with_realloc<int> >::SetKey, EqualKey =
std::equal_to<int>, Alloc = google::libc_allocator_with_realloc<int>]'
google/sparse_hash_set:168: instantiated from 'google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::sparse_hash_set(typename
google::sparse_hashtable<Value, Value, HashFcn, google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::Identity, google::sparse_hash_set<Value, HashFcn,
EqualKey, Alloc>::SetKey, EqualKey, Alloc>::size_type, const typename
google::sparse_hashtable<Value, Value, HashFcn, google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::Identity, google::sparse_hash_set<Value, HashFcn,
EqualKey, Alloc>::SetKey, EqualKey, Alloc>::hasher&, const typename
google::sparse_hashtable<Value, Value, HashFcn, google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::Identity, google::sparse_hash_set<Value, HashFcn,
EqualKey, Alloc>::SetKey, EqualKey, Alloc>::key_equal&, const Alloc&) [with
Value = int, HashFcn = __gnu_cxx::hash<int>, EqualKey = std::equal_to<int>,
Alloc = google::libc_allocator_with_realloc<int>]'
simple_test.cxx:62: instantiated from here
google/sparsehash/hashtable-common.h:158: error: exception handling disabled,
use -fexceptions to enable
Compiling simple_test.o
google/sparsehash/hashtable-common.h: In member function 'SizeType
sh_hashtable_settings<Key, HashFunc, SizeType,
HT_MIN_BUCKETS>::min_buckets(SizeType, SizeType) [with Key = int, HashFunc =
__gnu_cxx::hash<int>, SizeType = unsigned int, int HT_MIN_BUCKETS = 4]':
google/sparsehash/sparsehashtable.h:760: instantiated from
'google::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey,
Alloc>::sparse_hashtable(typename Alloc::rebind<Value>::other::size_type, const
HashFcn&, const EqualKey&, const ExtractKey&, const SetKey&, const Alloc&)
[with Value = int, Key = int, HashFcn = __gnu_cxx::hash<int>, ExtractKey =
google::sparse_hash_set<int, __gnu_cxx::hash<int>, std::equal_to<int>,
google::libc_allocator_with_realloc<int> >::Identity, SetKey =
google::sparse_hash_set<int, __gnu_cxx::hash<int>, std::equal_to<int>,
google::libc_allocator_with_realloc<int> >::SetKey, EqualKey =
std::equal_to<int>, Alloc = google::libc_allocator_with_realloc<int>]'
google/sparse_hash_set:168: instantiated from 'google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::sparse_hash_set(typename
google::sparse_hashtable<Value, Value, HashFcn, google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::Identity, google::sparse_hash_set<Value, HashFcn,
EqualKey, Alloc>::SetKey, EqualKey, Alloc>::size_type, const typename
google::sparse_hashtable<Value, Value, HashFcn, google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::Identity, google::sparse_hash_set<Value, HashFcn,
EqualKey, Alloc>::SetKey, EqualKey, Alloc>::hasher&, const typename
google::sparse_hashtable<Value, Value, HashFcn, google::sparse_hash_set<Value,
HashFcn, EqualKey, Alloc>::Identity, google::sparse_hash_set<Value, HashFcn,
EqualKey, Alloc>::SetKey, EqualKey, Alloc>::key_equal&, const Alloc&) [with
Value = int, HashFcn = __gnu_cxx::hash<int>, EqualKey = std::equal_to<int>,
Alloc = google::libc_allocator_with_realloc<int>]'
simple_test.cxx:62: instantiated from here
google/sparsehash/hashtable-common.h:158: error: exception handling disabled,
use -fexceptions to enable
Original comment by PASimon...@gmail.com
on 3 Jun 2011 at 8:39
It looks like this (comment #2) is a separate problem. The fix is likely to do
what gcc tells you to do:
google/sparsehash/hashtable-common.h:158: error: exception handling disabled,
use -fexceptions to enable
Original comment by csilv...@gmail.com
on 4 Jun 2011 at 1:12
Any more word on this (the original bug)? I'm closing it CannotReproduce, but
feel free to reopen it if you have more information.
Original comment by csilv...@gmail.com
on 26 Aug 2011 at 1:09
Original issue reported on code.google.com by
chaimmi...@gmail.com
on 19 Jan 2011 at 1:01