Bruno Haible, le sam. 03 sept. 2022 01:15:13 +0200, a ecrit: > Samuel Thibault wrote: > > That's already fixed: > > > > https://patchwork.sourceware.org/project/glibc/patch/20220827134844.1263243-2-samuel.thiba...@ens-lyon.org/ > > "Spotted by the libunistring testsuite test-perror2" > > Yes, this was exactly the test case that I investigated as well. > > > https://salsa.debian.org/glibc-team/glibc/-/commit/86b00092f9296be2b212891ed94945d05503b92d > > Here, the patch "Spotted by the libunistring testsuite test-strerror_r" is not > necessary.
That's where it showed up and the consequence visible in Debian. > The test failure was caused by a bug in gnulib, fixed today [1]. Arguably it's not a bug in gnulib: posix does recommend to fill the string even if it's too small. > The gnulib code made the assumption that strerror_r always returns a > thread-safe untruncated string. This assumption is wrong both on glibc/Linux > and on glibc/Hurd. ? IIRC at least as of glibc master, on Linux it does fill the string even on error. Samuel