[llvm-commits] [PATCH] report_fatal_error() issue

Dan Gohman gohman at apple.com
Wed Feb 2 09:15:19 PST 2011



On Feb 1, 2011, at 11:38 PM, NAKAMURA Takumi <geek4civic at gmail.com>  
wrote:

> Dan and all,
>
> raw_fd_ostream::~raw_fd_ostream() is called as global dtors(in  
> atexit handler).
> raw_fd_ostream::~raw_fd_ostream() could invoke report_fatal_error().
> report_fatal_error() exits by exit(1);
>
> Then global dtors for raw_fd_ostream would be called and might crash.
>
> I propose report_fatal_error() should be suppressed at stderr's error.
>
> On Windows 7(x64), I met this issue. (I have not met on Windows XP)

If there's a real bug here, please explain it.  Otherwise, this seems  
to be some Windows quirk, so it should be conditionalized with #if  
accordingly.  In either case, please add a comment in the code.

Dan




More information about the llvm-commits mailing list