Re: [Qemu-devel] [PULL 2/4] coverity: Model GLib string allocation partially

2015-02-12 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: On 05/02/2015 17:24, Markus Armbruster wrote: + +char *g_strdup(const char *s) +{ +char *dup; +size_t i; + +if (!s) { +return NULL; +} + +__coverity_string_null_sink__(s); +__coverity_string_size_sink__(s);

Re: [Qemu-devel] [PULL 2/4] coverity: Model GLib string allocation partially

2015-02-11 Thread Paolo Bonzini
On 05/02/2015 17:24, Markus Armbruster wrote: + +char *g_strdup(const char *s) +{ +char *dup; +size_t i; + +if (!s) { +return NULL; +} + +__coverity_string_null_sink__(s); +__coverity_string_size_sink__(s); What's __coverity_string_size_sink__? It is

[Qemu-devel] [PULL 2/4] coverity: Model GLib string allocation partially

2015-02-05 Thread Markus Armbruster
Without a model, Coverity can't know that the result of g_strdup() needs to be fed to g_free(). One way to get such a model is to scan GLib, build a derived model file with cov-collect-models, and use that when scanning QEMU. Unfortunately, the Coverity Scan service we use doesn't support that.