this code returns false positives in Valgrind, so we fall back to the other implementation when running in valgrind. see #17717
this code returns false positives in Valgrind, so we fall back to the other implementation when running in valgrind. see #17717