coverity-model: constrain g_malloc/g_malloc0/g_realloc as never returning NULL
commit0da41187dfda6abecbcbc237471254ab614e063d
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 Jul 2021 17:12:22 +0000 (28 19:12 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 30 Jul 2021 10:04:01 +0000 (30 12:04 +0200)
treed9648798887bc8da0021e2c49e27fd726ac15f72
parent05ad6857a57238c27df84f6c0c1943dd162a82ad
coverity-model: constrain g_malloc/g_malloc0/g_realloc as never returning NULL

g_malloc/g_malloc0/g_realloc only return NULL if the size is 0; we do not need
to cover that in the model, and so far have expected __coverity_alloc__
to model a non-NULL return value.  But that apparently does not work
anymore, so add some extra conditionals that invoke __coverity_panic__
for NULL pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/coverity-scan/model.c