Open spencer-lunarg opened 7 months ago
To chime in here as well:
The latest version of unordered_dense fires off compiler warnings as noted here:
_deps/unordered_dense-src/include/ankerl/unordered_dense.h:984:24: error: 'void* memset(void*, int, size_t)' forming offset [32, 34359738367] is out of the bounds [0, 32] [-Werror=array-bounds=]
984 | std::memset(&*m_buckets, 0, sizeof(Bucket) * bucket_count());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
I'm having trouble integrating the new version as its a requirement that we treat warnings as errors.
Information: GCC 13.2, Ubuntu 20.04, CMake 3.27
The relevant usage in my code is this:
struct Entry {
std::string a;
uint64_t b;
};
ankerl::unordered_dense::map<boost::uuids::uuid, Entry, boost::hash<boost::uuids::uuid>> a_;
I tried including the library as a system include, but this didn't not solve the problem. Any guidance would be helpful
(I don't have a good way to reproduce this, so please feel free to close this issue if you find it not possible to fix easily or something not supported... but wanted to at least report it)
Trying to use this library, we found that an array of
segmented_map
causes failure for both MinGW and Ubuntu 22.04/clang-14/fsanitize=thread
The issue is seems to be the fact
bucket_count()
returns a large valueIn this case, the
Bucket
was 8 and that with max uint32 is how we got8 * 4294967296 = 34359738368
Spent some time trying to understand, but seems the