[PATCH] Always do locking when accessing streams (bug 15142, bug 14697)

Florian Weimer fweimer@redhat.com
Mon Jul 3 07:53:42 GMT 2023


* Andreas Schwab:

> On Jun 30 2023, Florian Weimer wrote:
>
>> * Andreas Schwab via Libc-alpha:
>>
>>> Now that abort no longer calls fflush there is no reason to avoid locking
>>> the stdio streams anywhere.  This fixes a conformance issue and potential
>>> heap corruption during exit.
>>
>> Mechanics of the patch look okay to me.  In the end, we may have to make
>> this configurable if too many applications hang during shutdown, but I
>> think we should put it into the upcoming release.
>
> This has been part of SUSE/openSUSE for several years, and I have not
> seen any complaints so far.  It's more likely that you get a crash
> during the unlocked access to the streams.

Oh, thanks for running the experiment, and upstreaming the result.  I
agree that it should make it likely that there are no issues.

Florian



More information about the Libc-alpha mailing list