[cfe-dev] Quit Application Error.

Paul Griffiths gafferuk at gmail.com
Mon Aug 23 05:46:50 PDT 2010


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?

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
>>
>




More information about the cfe-dev mailing list