[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling b
Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling bugs
Sun, 1 Dec 2019 14:46:33 +0100
On Saturday, November 30, 2019, David Hildenbrand <address@hidden> wrote:
> Am 30.11.2019 um 20:42 schrieb Markus Armbruster <address@hidden>:
> cpu_model_from_info() is a helper for qmp_query_cpu_model_expansion(),
> qmp_query_cpu_model_comparison(), qmp_query_cpu_model_baseline(). It
> crashes when the visitor or the QOM setter fails, and its @errp
> argument is null. Messed up in commit 137974cea3 's390x/cpumodel:
> implement QMP interface "query-cpu-model-expansion"'.
> Its three callers have the same bug. Messed up in commit 4e82ef0502
> 's390x/cpumodel: implement QMP interface "query-cpu-model-comparison"'
> and commit f1a47d08ef 's390x/cpumodel: implement QMP interface
> The bugs can't bite as no caller actually passes null. Fix them
„ A software bug is an error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. „
Please make it clear in the descriptions that these are cleanups and not bugfixes. It might be very confusing for people looking out for real bugs.
Disclaimer: I am not entirely familiar with the code in question, so take my opinion with reasonablereservation.
It looks that we here deal with latent bugs. As you probably know from experience, a latent bugs, when they are activated with some ostensibly unrelated code change, can be much more difficult to diagnose and fix than regular bugs.
In that light, this change is not a clean up. It is a fix of a latent bugs, and Markus' aproach to treat it as a bug fix looks right to me. I would just add a word "latent" or similar, which would even more distance the patch from "cleanup" meaning.
David, if I understand well, this patch fixes the commit done by you. I definitely understand this is not a pleasant position, but we all (definitelly including myself too) should learn to handle such situations as gracefully as we can.
Also, please change the terminology „messed up“ to „introduced in“ or similar.
(applies to all s390x patches)
- Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling bugs,
Aleksandar Markovic <=