[PATCH] Always do locking when accessing streams (bug 15142, bug 14697)
Florian Weimer
fw@deneb.enyo.de
Mon Feb 17 09:42:00 GMT 2020
* Andreas Schwab:
> On Feb 16 2020, Florian Weimer wrote:
>
>> I'm not sure if the justification is correct. We don't know if there
>> are programs which call flockfile on some file and expect exit to
>> still work (and terminate the program), which is part of what
>> nptl/tst-stdio1 tests.
>
> But that's exactly what the bug is about. Random memory corruption
> cannot be the answer.
Sure, but breaking existing programs so that they never terminate is
not acceptable, either.
(They might employ external locking and not have any data races, so
they don't need this change.)
Just to be clear, I think your patch is worth a try, we just have to
be prepared to revert it and replace it with symbol versioning for
exit.
More information about the Libc-alpha
mailing list