DescriptionFix race condition in concurrent printf and fopen.
Fixes a race condition reported by ThreadSanitizer that happens when fopen() and
printf() are invoked concurrently. fopen() would traverse the list of all open
files and check their _flags for non-zero (in __sfp()), while printf would
attempt to modify the flags for _stdout via ORIENT(fp, -1) in vfprintf.c:679.
BUG=none, but related to http://code.google.com/p/nativeclient/issues/detail?id=870
TEST=./scons irt=0 platform=x86-64 run_newlib_stdio_test --verbose buildbot=tsan
with patch: http://codereview.chromium.org/3298014
(the fix does not remove the race reports completely, there is a remaining
race on errno)
Committed: http://git.chromium.org/gitweb?p=native_client/nacl-newlib.git;a=commit;h=f5185a5
Patch Set 1 #Patch Set 2 : emailing #
Messages
Total messages: 6 (0 generated)
|