[cfe-dev] Quit Application Error.

Chris Lattner clattner at apple.com
Mon Aug 23 10:05:06 PDT 2010


On Aug 23, 2010, at 5:46 AM, Paul Griffiths wrote:

> I have more info on the crash.
> It's in raw_ostream.cpp at function:
> raw_ostream &raw_ostream::write(const char *Ptr, size_t Size)
> 
> 5th line:
> write_impl(Ptr, Size);
> 
> any ideas?

It sounds like the raw_ostream is destroyed, then something is continuing to try to write on it.

-Chris

> 
> On 23 August 2010 12:32, Paul Griffiths <gafferuk at gmail.com> wrote:
>> no, still happens.
>> 
>> On 23 August 2010 11:43, Bruce Stephens <bruce.r.stephens at gmail.com> wrote:
>>> Paul Griffiths <gafferuk-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
>>> writes:
>>> 
>>>> Ni im not deleting anything, Im running each instance of clang in it's
>>>> own thread, when I want to quit the app, the thread calles
>>>> llvm::llvm_shutdown()  and exits.
>>>> 
>>>> Even if theres only one instance of clang running, it throws an error
>>>> when I quit.
>>> 
>>> IIUC the ownership patterns in Diagnostic changed relatively recently,
>>> so (for example) the clang-interpreter is incorrect.  Currently it has:
>>> 
>>>  TextDiagnosticPrinter DiagClient(llvm::errs(), DiagnosticOptions());
>>> 
>>>  Diagnostic Diags(&DiagClient);
>>> 
>>> I think this should now be something like
>>> 
>>>  TextDiagnosticPrinter* DiagClient = new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions());
>>> 
>>>  Diagnostic Diags(DiagClient);
>>> 
>>> i.e., the destructor for Diagnostic will attempt to delete DiagClient
>>> which might well be the crash you're seeing?
>>> 
>>> [...]
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>> 
>> 
> 
> _______________________________________________
> 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