[cfe-dev] Clang crash in HTMLDiagnostics

Ted Kremenek kremenek at apple.com
Thu Aug 7 10:52:03 PDT 2008

On Aug 7, 2008, at 10:18 AM, Nico Weber wrote:

>> I started playing around with clang today, and hit a crash in the
>> HTMLDiagnostics. Unfortunately I don't have the time to reduce the
>> test case right now, but nevertheless I wanted to draw your attention
>> to this (maybe it's something obvious for people who know the code).
>> I'll try to come up with a testcase that relies only on open source
>> code for people to reproduce.
> It seems this (or at least something related) happens with any input
> file that produces a warning:
> Macintosh-3:clang nico$ cat test.c
> int main() {
>   char b[10] = "";
>   printf(b);
> }

I fixed the problem for Nico's test case:


The problem was that when using --html-diags we didn't have a  
Preprocessor available when constructing HTMLDiagnosticClient, which  
led to all sorts of badness.

Kay: can you confirm that this fixes the issue for you?

More information about the cfe-dev mailing list