[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strerror and perror / strerror_r error messages differ

From: Samuel Thibault
Subject: Re: strerror and perror / strerror_r error messages differ
Date: Sat, 3 Sep 2022 01:28:21 +0200
User-agent: NeoMutt/20170609 (1.8.3)

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.thibault@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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]