[cfe-commits] r124613 - /cfe/trunk/lib/Frontend/FrontendActions.cpp

Daniel Dunbar via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 16 15:45:37 PST 2017


IIRC, and I can hardly guarantee I do, the issue is that libclang
installing signal handlers doesn’t play well with the arbitrary
applications which can be linking libclang.

 - Daniel

On Thu, Nov 16, 2017 at 3:26 PM Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Daniel Dunbar <daniel at zuster.org> writes:
>
> > Author: ddunbar
> > Date: Mon Jan 31 16:00:44 2011
> > New Revision: 124613
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=124613&view=rev
> > Log:
> > libclang: Don't allow RemoveFileOnSignal to be called via libclang,
> badness can
> > ensue.
>
>
> Sorry for digging out such an old commit, but do you remember what
> badness that ensues if RemoveFileOnSignal is called?
>
> Would the same badness ensue if FILE_FLAG_DELETE_ON_CLOSE were used on
> Windows?
>
>
> Thanks,
> Rafael
>
>
> > Modified:
> >     cfe/trunk/lib/Frontend/FrontendActions.cpp
> >
> > Modified: cfe/trunk/lib/Frontend/FrontendActions.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendActions.cpp?rev=124613&r1=124612&r2=124613&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/lib/Frontend/FrontendActions.cpp (original)
> > +++ cfe/trunk/lib/Frontend/FrontendActions.cpp Mon Jan 31 16:00:44 2011
> > @@ -104,7 +104,10 @@
> >      return true;
> >    }
> >
> > -  OS = CI.createDefaultOutputFile(true, InFile);
> > +  // We use createOutputFile here because this is exposed via libclang,
> and we
> > +  // must disable the RemoveFileOnSignal behavior.
> > +  OS = CI.createOutputFile(CI.getFrontendOpts().OutputFile,
> /*Binary=*/true,
> > +                           /*RemoveFileOnSignal=*/false, InFile);
> >    if (!OS)
> >      return true;
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171116/40c95200/attachment.html>


More information about the cfe-commits mailing list