Alexander, this patch does fflush() for stderr and stdout whereas fflush(0) tries to flush all streams and thus causes deadlock under some circumstances mentioned in rL200922. http://reviews.llvm.org/D6462