02b7035d | 18-Jul-2022 |
Peter Maydell <peter.maydell@linaro.org> |
scripts/coverity-scan/COMPONENTS.md: Update slirp component info
Update the regex for the slirp component now that it lives solely inside /slirp/, and note that it should be ignored in Coverity anal
scripts/coverity-scan/COMPONENTS.md: Update slirp component info
Update the regex for the slirp component now that it lives solely inside /slirp/, and note that it should be ignored in Coverity analysis (because it's a separate upstream project now, and they run Coverity on it themselves).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20220718142310.16013-3-peter.maydell@linaro.org
show more ...
|
e17bdaab | 27-Jul-2021 |
Paolo Bonzini <pbonzini@redhat.com> |
coverity-model: write models fully for non-array allocation functions
Coverity seems to have issues figuring out the properties of g_malloc0 and other non *_n functions. While this was "fixed" by r
coverity-model: write models fully for non-array allocation functions
Coverity seems to have issues figuring out the properties of g_malloc0 and other non *_n functions. While this was "fixed" by removing the custom second argument to __coverity_mark_as_afm_allocated__, inline the code from the array-based allocation functions to avoid future issues.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
0da41187 | 28-Jul-2021 |
Paolo Bonzini <pbonzini@redhat.com> |
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 h
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>
show more ...
|
96915d63 | 27-Jul-2021 |
Paolo Bonzini <pbonzini@redhat.com> |
coverity-model: remove model for more allocation functions
These models are not needed anymore now that Coverity does not check anymore that the result is used with "g_free". Coverity understands G
coverity-model: remove model for more allocation functions
These models are not needed anymore now that Coverity does not check anymore that the result is used with "g_free". Coverity understands GCC attributes and uses them to detect leaks.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
243a545b | 27-Jul-2021 |
Paolo Bonzini <pbonzini@redhat.com> |
coverity-model: make g_free a synonym of free
Recently, Coverity has started complaining about using g_free() to free memory areas allocated by GLib functions not included in model.c, such as g_strf
coverity-model: make g_free a synonym of free
Recently, Coverity has started complaining about using g_free() to free memory areas allocated by GLib functions not included in model.c, such as g_strfreev. This unfortunately goes against the GLib documentation, which suggests that g_malloc() should be matched with g_free() and plain malloc() with free(); since GLib 2.46 however g_malloc() is hardcoded to always use the system malloc implementation, and g_free is just "free" plus a tracepoint. Therefore, this should not cause any problem in practice.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|