[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5] coverity: Store the modelling file in the source tree.



On 24/01/14 17:04, Ian Campbell wrote:
> On Thu, 2014-01-23 at 14:28 +0000, Andrew Cooper wrote:
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> CC: Keir Fraser <keir@xxxxxxx>
>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>> CC: Tim Deegan <tim@xxxxxxx>
>> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
>> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
>> CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
>>
>> ---
>>
>> George:
>>   This is just documentation, and it would be nice to include it as part of
>>   the 4.4 release.
>> ---
>>  misc/coverity_model.c |   98 
>> +++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 98 insertions(+)
>>  create mode 100644 misc/coverity_model.c
>>
>> diff --git a/misc/coverity_model.c b/misc/coverity_model.c
>> new file mode 100644
>> index 0000000..418d25e
>> --- /dev/null
>> +++ b/misc/coverity_model.c
>> @@ -0,0 +1,98 @@
>> +/* Coverity Scan model
>> + *
>> + * This is a modelling file for Coverity Scan. Modelling helps to avoid 
>> false
>> + * positives.
>> + *
>> + * - A model file can't import any header files.
>> + * - Therefore only some built-in primitives like int, char and void are
>> + *   available but not NULL etc.
>> + * - Mode-ling doesn't need full structs and typedefs. Rudimentary structs
>> + *   and similar types are sufficient.
>> + * - An uninitialized local pointer is not an error. It signifies that the
>> + *   variable could be either NULL or have some data.
>> + *
>> + * Coverity Scan doesn't pick up modifications automatically. The model file
>> + * must be uploaded by an admin in the analysis.
>> + *
>> + * Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
>> + * 2011, 2012, 2013 Python Software Foundation; All Rights Reserved
>> + *
>> + * The Xen Coverity Scan modelling file used the cpython modelling file as a
>> + * reference to get started (suggested by Coverty Scan themselves as a good
>> + * example), but all content is Xen specific.
> Given that you (I pressume?) wrote at least some of the C like stuff I
> think you can include your copyright too as well as the Python one. Is
> there actually any cpython stuff left?
>
> If there were a link to the docs in this comment that would be good too.
>
>

See "Useful links" in the comment below this one in the file.

Most of this comment is from the cpython file, and I suppose technically
the "#define NULL (void)0" and "#define assert() /*empty*/" were.

But mainly, the cpython was just an example of an existing modelling
file, which was a substantially more useful when working out how to
write the Xen one than the Coverity documentation of which each of the
__coverity_$FOO() functions mean and do.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.