Closed GoogleCodeExporter closed 9 years ago
This happens because TSan calls fflush(0) at program shutdown, while the child
thread is holding a lock on the file stream.
Dima's suggestion is to replace the call to fflush(0) with "fflush(stdout);
fflush(stderr);"
Original comment by gli...@google.com
on 6 Feb 2014 at 12:15
I don't see how I can make this test reliable enough to commit it.
Turns out that the program may exit before the call to getline(), and we can't
synchronize that call with the program exit, because getline() never ends.
I'm gonna submit the fix without this test.
Original comment by gli...@google.com
on 6 Feb 2014 at 1:39
sleep(1) will help you to write the test
also it's not necessary for a test to fail 100% of time
Original comment by dvyu...@google.com
on 6 Feb 2014 at 1:46
Coped with an infinite loop in thread() instead of a sleep.
r200922 fixes the issue and r200923 adds the test.
Original comment by gli...@google.com
on 6 Feb 2014 at 2:12
Adding Project:ThreadSanitizer as part of GitHub migration.
Original comment by gli...@google.com
on 30 Jul 2015 at 9:21
Original issue reported on code.google.com by
gli...@google.com
on 6 Feb 2014 at 11:59