[cfe-dev] Quit Application Error.

Paul Griffiths gafferuk at gmail.com
Mon Aug 23 04:32:54 PDT 2010


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