This bug was fixed in glibc commit https://github.com/bminor/glibc/commit/27fe5f2e67a0e4cc0526b1b32b55f8e519075edb