r186219 - Changes so that a few tests do not fail when running under guarded malloc.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Jan 23 15:12:35 PST 2014


On 23 January 2014 17:06, Gao, Yunzhong
<yunzhong_gao at playstation.sony.com> wrote:
> Hi Argyrios,
> No, it is not a big problem for me. I was confused by the error message "LLVM ERROR: IO failure on output stream"
> so I thought I would report this. I debugged the issue a little bit, and it seems that when combining "-o -" and
> "-fdump-record-layouts", there will be two copies of raw_fd_ostream to stdout, created in
> CompilerInstance::addOutputFile() and llvm::outs() respectively, so when clang exits, stdout will be closed twice. I did
> not find very good solution from googling about how to detect already closed file descriptors on Linux other than
> checking the return value and errno of ::close().

Maybe clang (the driver) should just error on two "things" asking for stdout?

Cheers,
Rafael



More information about the cfe-commits mailing list