[PATCH] Disable single thread optimization for open_memstream
Szabolcs Nagy
szabolcs.nagy@arm.com
Wed Jul 12 14:22:00 GMT 2017
On 12/07/17 15:10, Florian Weimer wrote:
> On 07/12/2017 04:09 PM, Szabolcs Nagy wrote:
>> Single thread optimization is valid if at thread creation time the
>> optimization can be disabled. This is in principle true for all
>> stream objects that user code can access (and thus needs locking),
>> using the same internal list as fflush(0) uses. However in glibc
>> open_memstream is not on that list (BZ 21735) so the optimization
>> has to be disabled.
>>
>> 2017-07-12 Szabolcs Nagy <szabolcs.nagy@arm.com>
>>
>> * libio/memstream.c (__open_memstream): Set _IO_FLAGS2_NEED_LOCK.
>> * libio/wmemstream.c (open_wmemstream): Likewise.
>
> What about the test case I posted?
>
it passes now, but i did not add it to glibc.. may be i should have.
but now i'll wait for Adhemerval updating his patch.
More information about the Libc-alpha
mailing list