From: Behdad Esfahbod Date: Wed, 8 May 2019 23:16:43 +0000 (-0700) Subject: Fix msan issue X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afb013f350b0022ae6c05f140aeba23d5de34101;p=platform%2Fupstream%2FlibHarfBuzzSharp.git Fix msan issue hb_identity returns rvalue-reference if input is rvalue. That, can leak the reference and cause in bad access to temporaries after they are destructed. This is unfortunately unfixable given the desired transparency of hb_identity :(. Just don't use it with hb_map(). --- diff --git a/src/test-iter.cc b/src/test-iter.cc index 0a0e4d1..944c234 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -161,7 +161,7 @@ main (int argc, char **argv) test_iterator_non_default_constructable (hb_enumerate (hb_iter (st))); test_iterator_non_default_constructable (hb_enumerate (hb_iter (st) + 1)); test_iterator_non_default_constructable (hb_iter (st) | hb_filter ()); - test_iterator_non_default_constructable (hb_iter (st) | hb_map (hb_identity)); + test_iterator_non_default_constructable (hb_iter (st) | hb_map (hb_rvalue)); assert (true == hb_all (st)); assert (false == hb_all (st, 42u));