[cfe-dev] Why clang needs to fork into itself?
Ted Kremenek
kremenek at apple.com
Tue Jan 28 23:05:04 PST 2014
If this can be done, then great.
Yury Gribov’s point about stack smashing is a good one. We implemented such crash recovery mechanisms in libclang and libclang still takes down Xcode sometimes because of stack overflows due to unbounded recursion, etc. We’ve also noticed that when libclang “crashes” (and recovers) the overall process can be in an undefined state. Our experience is that such histrionics can provide an 80% solution, but we’ve never been all that satisfied with them. It may, however, be good enough for generating crash reports, but it seems like a lot of work to replace something we already have that works very well in practice.
On Jan 28, 2014, at 10:28 PM, Yuri <yuri at rawbw.com> wrote:
> On 01/28/2014 22:04, Yury Gribov wrote:
>>
>> Makes sense but what if some important bits (say argv) are trashed by stack overflow
>
> All information needed for crash reporting should be copied into the fixed memory area, and it should be made read-only for the duration of run.
>
> Yuri
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list