Closed sgn closed 1 year ago
This is called heterogeneous lookup. You can do the look up without create an actual key type.
I think the key issue is that boost changes the way it hashes std::string, that breaks the assumption of hasher.
Their release notes seems to indicate there is a major change in Boost.Unordered.
I'd suggest it's about boost::hash
I can see there's a major update of "container hash" in 1.81. I guess that changes how hash against std::string works.
The fix should be use our own string hash implementation to we won't be break by upstream change in the future.
@sgn can you check if master fixes the issue?
Yes, the change fixed libime for boost 1.81.0
The segfault caused by nullptr-dereference in line 381
https://github.com/fcitx/libime/blob/e199ce44fd85b86e0a906819fa93d4fadda3a2ca/src/libime/pinyin/pinyindictionary.cpp#L376-L381
libime finds the path by
Compatible{Key,Hash,Predicate}
: https://github.com/fcitx/libime/blob/e199ce44fd85b86e0a906819fa93d4fadda3a2ca/src/libime/core/lrucache.h#L75-L80 but theinsert
check bykey_type
: https://github.com/fcitx/libime/blob/e199ce44fd85b86e0a906819fa93d4fadda3a2ca/src/libime/core/lrucache.h#L43-L44