Closed jobol closed 3 months ago
Metrohash has come up a few times recently. We may have to replace it - would you be up for testing xxhash as an alternative?
Do you mean "are you up to code integration of xxhash" or just "are you up for testing an already done draft"?
I think I already have a xxhash impl. that fit the used interface. It would be good to know if you can see if the issue is in Metrohash, or in the interfacing code like ptrset and ht_hash_function etc.
Seeing your next message - I'd say both. I can look for a proper intergation to give you.
It is easy for me to check an existing proposal. But okay for both but at spare time.
OK, I added a new branch "hash" with a new directory "external/hash2". I will delete it again later and it is not intended for direct unqualified integration. But it uses the same interface, possible at a different revision, and it includes MurMurhash and xxhash. The interface allows to create different hash table implementations based on a single hash function.
FYI: the clang sanitizer also has a problem with metrohash, see log output of first message in issue: https://github.com/dvidelabs/flatcc/issues/236
flatcc/external/hash/cmetrohash.h:62:22: runtime error: load of misaligned address 0x562a0e5a99fe for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
0x562a0e5a99fe: note: pointer points here
Please check branch https://github.com/dvidelabs/flatcc/tree/hash if you have time. I updated the branch with latest on master and it should replace cmetrohash experimentally. I don't have a reproducible setup. If it works for you I can replace the hash function, but I don't know where the issue is exactly.
I'm focused on some other work at the moment but I could find some time next week to check that.
Great, thanks.
I forgot to enable xxhash on that branch. I have pushed an update. I would be interested in both warnings from cmetrohash on the main branch and how xxhash works on the hash branch. FYI: it is possible to enable cmetrohash again in the hash branch by defining the C flag HT_HASH_FALLBACK, and uncommenting a line removing cmetrohash in src/compiler/CMakeList.txt.
@jobol this is the only issue left before a 0.6.2 release is ready, not to rush, just a heads up. I am inclined to a potential hash table change until after the release because it might break things somewhere, but it would still be good to know if there is something that ought to be fixed before the release.
EDIT: forgot about --outfile, that is also pending that you take a look.
I merged xxhash changes to master. I don't know if it fixes the reported issue, but xxhash is the better hash table either way.
Closing as potentially fixed due to lack of feedback.
When compiling with GCC 11.2.0 (ubuntu 22) with link time optimizations the error below is reported
Also when using
flatcc
generated (even after the error report) with the following command line:a strange error is reported most of the time:
Investigations gave nothing on my side (for the time I can give). But removing LTO solves the issue.