[llvm] r183868 - [Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.

Reid Kleckner rnk at google.com
Thu Jun 13 07:50:48 PDT 2013


I think this leaks memory and a handle if you never wait on the program now.

I'm working on a more complete fix.


On Thu, Jun 13, 2013 at 10:42 AM, Aaron Ballman <aaron at aaronballman.com>wrote:

> I think I've fixed the issue in r183904 -- there was an uninitialized
> variable being passed into Execute, so anything we tried to execute
> would end up crashing.  I'll watch the build bots.
>
> ~Aaron
>
> On Thu, Jun 13, 2013 at 10:32 AM, Reid Kleckner <rnk at google.com> wrote:
> > For me they center around 'not.exe' crashing.  I don't have a stack trace
> > yet because I have to rebuild with debug info =/.
> >
> >
> > On Thu, Jun 13, 2013 at 6:35 AM, Timur Iskhodzhanov <timurrrr at google.com
> >
> > wrote:
> >>
> >> Hi Rafael,
> >>
> >> Even though Clang now builds fine on Windows, I observe crashes while
> >> building simple Windows tests on my local bot.
> >> Unfortunately, I'm out of the office today so can't help you diagnose.
> >>
> >> Reid, Takumi - can you help Rafael?
> >>
> >> 2013/6/13 Rafael Espindola <rafael.espindola at gmail.com>:
> >> > Author: rafael
> >> > Date: Wed Jun 12 16:25:04 2013
> >> > New Revision: 183868
> >> >
> >> > URL: http://llvm.org/viewvc/llvm-project?rev=183868&view=rev
> >> > Log:
> >> > [Win] Put ChangeStdinToBinary ChangeStdoutToBinary
> ChangeStderrToBinary
> >> > in sys.
> >> >
> >> > Modified:
> >> >     llvm/trunk/lib/Support/Windows/Program.inc
> >> >
> >> > Modified: llvm/trunk/lib/Support/Windows/Program.inc
> >> > URL:
> >> >
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Program.inc?rev=183868&r1=183867&r2=183868&view=diff
> >> >
> >> >
> ==============================================================================
> >> > --- llvm/trunk/lib/Support/Windows/Program.inc (original)
> >> > +++ llvm/trunk/lib/Support/Windows/Program.inc Wed Jun 12 16:25:04
> 2013
> >> > @@ -421,21 +421,21 @@ static int Wait(void *&Data, const Path
> >> >  }
> >> >
> >> >  namespace llvm {
> >> > -error_code ChangeStdinToBinary(){
> >> > +error_code sys::ChangeStdinToBinary(){
> >> >    int result = _setmode( _fileno(stdin), _O_BINARY );
> >> >    if (result == -1)
> >> >      return error_code(errno, generic_category());
> >> >    return make_error_code(errc::success);
> >> >  }
> >> >
> >> > -error_code ChangeStdoutToBinary(){
> >> > +error_code sys::ChangeStdoutToBinary(){
> >> >    int result = _setmode( _fileno(stdout), _O_BINARY );
> >> >    if (result == -1)
> >> >      return error_code(errno, generic_category());
> >> >    return make_error_code(errc::success);
> >> >  }
> >> >
> >> > -error_code ChangeStderrToBinary(){
> >> > +error_code sys::ChangeStderrToBinary(){
> >> >    int result = _setmode( _fileno(stderr), _O_BINARY );
> >> >    if (result == -1)
> >> >      return error_code(errno, generic_category());
> >> >
> >> >
> >> > _______________________________________________
> >> > llvm-commits mailing list
> >> > llvm-commits at cs.uiuc.edu
> >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130613/051c0981/attachment.html>


More information about the llvm-commits mailing list