Skip to content
Commit de895ddc authored by Szabolcs Nagy's avatar Szabolcs Nagy
Browse files

Disable single thread optimization for open_memstream

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.

	* libio/memstream.c (__open_memstream): Set _IO_FLAGS2_NEED_LOCK.
	* libio/wmemstream.c (open_wmemstream): Likewise.
	* nptl/tst-memstream.c: New.
parent 8bd8c052
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment