[cfe-dev] Why clang needs to fork into itself?

Reid Kleckner rnk at google.com
Mon Jan 27 14:27:38 PST 2014


As an alternative, on Windows we could rig up some kind of SEH filter to do
crash recovery.  Then we could save the subprocess invocation and speed
things up.


On Mon, Jan 27, 2014 at 2:21 PM, Benjamin Kramer <benny.kra at gmail.com>wrote:

>
> On 27.01.2014, at 22:56, Richard <legalize at xmission.com> wrote:
>
> >
> > In article <CAAnoKN971ZHsDU-01s5pqbUK2qKNW=_rJy-t=
> u7ovDd7kOWFyg at mail.gmail.com>,
> >    Tomasz Mikolajczyk <tmmikolajczyk at gmail.com> writes:
> >
> >> I haven't see the code but potentially the purpose of forking is to
> >> handle internal compiler errors, especially the case when the child
> >> process crashes when processing an input code. That may be easily
> >> detected and handled properly by the parent process, by collecting the
> >> trace, logs and by encouraging user to fill an issue in the bug DB,
> >> etc.
> >
> > How is this going to work on Windows where fork semantics really aren't
> > supported?
> >
> > I've used crash report generator mechanisms on both linux and Windows
> > that didn't require forking oneself.
>
> "forking" is a bit misleading. Clang spawns a new copy of itself, it
> doesn't
> require fork semantics. The performance hit is probably a bit larger as
> creating processes tends to be more expensive on windows but it still works
> in exactly the same way as on unices.
>
> - Ben
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140127/caab43ff/attachment.html>


More information about the cfe-dev mailing list