On FreeBSD if_indextoname() leverages strncpy() that unpoisons the whole name buffer, what in turn results in the assertion following the if_indextoname() call to fail:
if (!if_indextoname(1, ifname)) { ... } assert(strlen(ifname) + 1 == __msan_test_shadow(ifname, sizeof(ifname)));