hb_ot_map_builder_t::feature_info_t::cmp function returns 1 for equal arguments. This violates requirements to qsort's comparison function (which must be a total ordering) and causes UB at runtime. In practice this may mean strange runtime misbehaviors. The issue can be easily fixed by prepending "a->seq == b->seq ? 0 :" to "a->seq < b->seq ? -1 : 1 to a->seq < b->seq ? -1 : 1". This seems to be the only comparison function in HarfBazz which have such problems.
Fixed. Thanks.
Thanks, Behdad. Just wanted to mention that bug was found using SortChecker tool.
Thanks Yury. Do you have a link?
Ah, sorry: https://github.com/yugr/sortcheck
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.