glibc strerrorname_np

Adhemerval Zanella adhemerval.zanella@linaro.org
Mon Nov 8 13:56:44 GMT 2021



On 07/11/2021 14:37, Zack Weinberg via Libc-alpha wrote:
> On Sat, Nov 6, 2021, at 8:51 AM, Adhemerval Zanella via Libc-alpha wrote:
>> On 05/11/2021 19:23, Jonny Grant wrote:
>>> On 05/11/2021 13:01, Adhemerval Zanella wrote:
>>>> On 05/11/2021 08:51, Jonny Grant wrote:
>>>>> Thank you for your reply. Personally I understood an ABI break would be
>>>>> the return type, the name, or the parameters. But the proposed change is
>>>>> not so. Changing to return a string, should be fine.
>>>>
>>>> It is still an ABI break, code that checks NULL for invalid input will
>>>> stop to work.
> ...
>> As I said before it is an ABI break, since users that check for invalid 
>> errno against NULL will start to fail.  For such change we *do need* all 
>> the trouble of adding a compat symbol with current semantic.
> 
> A compat symbol doesn't do any good here, though.  As soon as the program is recompiled it will start getting the new semantics, and since that doesn't cause a compile-time error, the break will go unnoticed -- particularly in this case, since this is likely to affect only error-handling paths that test suites tend not to exercise.
> 
> If we want to preserve backward compatibility we need a whole new function name.

This is the burden of any semantic change on exported symbols: new users
will need to adapt to it, since the idea is to keep older programs 
expecting the new semantic (since either rebuilding is not possible or
troublesome).


More information about the Libc-alpha mailing list