[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH] gdbstub: Re-factor gdb command extensions
From: |
Alex Bennée |
Subject: |
Re: [RFC PATCH] gdbstub: Re-factor gdb command extensions |
Date: |
Tue, 16 Jul 2024 14:48:04 +0100 |
Gustavo Romero <gustavo.romero@linaro.org> writes:
> Hi Alex,
>
> On 7/16/24 8:42 AM, Alex Bennée wrote:
>> Coverity reported a memory leak (CID 1549757) in this code and its
>> admittedly rather clumsy handling of extending the command table.
>> Instead of handing over a full array of the commands lets use the
>> lighter weight GPtrArray and simply test for the presence of each
>> entry as we go. This avoids complications of transferring ownership of
>> arrays and keeps the final command entries as static entries in the
>> target code.
> How did you run Coverity to find the leak? I'm wondering what's the
> quickest way to check it next time.
Coverity is only run in the cloud on the released build. There is a
container somewhere but I don't know how its used.
I did test on a build with --enable-sanitizers though.
>
>
>> Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
>> Cc: Gustavo Bueno Romero <gustavo.romero@linaro.org>
>> Cc: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>
>
>
> Cheers,
> Gustavo
--
Alex Bennée
Virtualisation Tech Lead @ Linaro