This seems like a reasonable approach. It's not wonderful, but it's more a 
sanity check than anything else, right?

Feel free to remove the check from a few lines down. Please add a test case as 
well.

Thanks for catching this!
Jordan


On Aug 25, 2014, at 1:49 , Daniel Fahlgren <[email protected]> wrote:

> Hi,
> 
> If you change the prototype of malloc it is possible to cause the
> analyzer to crash. This simple example will give you such a crash:
> 
> void malloc(int i);
> 
> void foo()
> {
>  malloc(1);
> }
> 
> It is the assertion on line 161 in SValBuilder.cpp that fails. Attached
> is a simple patch that fixes this, but I'm not sure the fix is correct.
> There seems to be a similar check a couple of lines further down in the
> code.
> 
> Best regards,
> Daniel Fahlgren
> <analyzer_crash.patch>

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to