grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 0/3] Clean up unused values
Date: Fri, 26 Jan 2024 03:14:07 -0500	[thread overview]
Message-ID: <CAAQmekdPHnWgCUjXQ9n8cO33BiBYQ-siTQZC1ZdNDF4axUhyHA@mail.gmail.com> (raw)
In-Reply-To: <CAEaD8JOd_SCOi+L_ZOGOw09CmeqRLqMtqfkb5G0qhiRH80Sg8w@mail.gmail.com>

If I may add a small point, apart from the invariant being kept,
initializing on definition also makes bug behavior more deterministic.
Hunting for a bug that only manifests on certain uninitialized values
in memory is hard.

On Thu, Jan 25, 2024 at 5:32 PM Vladimir 'phcoder' Serbinenko
<phcoder@gmail.com> wrote:
>
> I oppose to all 3 patches. These assignments are not redundant but keep an important invariant: the variable in question can be passed to free().
> For this it needs to either be NULL or point to a valid allocated memory. In this code this ensures that we never double free even after code changes
>
> Le sam. 20 janv. 2024, 05:53, Alec Brown <alec.r.brown@oracle.com> a écrit :
>>
>> Coverity listed three unused value bugs in the GRUB. These patches help clean
>> up and remove these uneccessary bits of code.
>>
>> The Coverity bugs being addressed are:
>> CID 428875
>> CID 428876
>> CID 428877
>>
>> Alec Brown (3):
>>       fs/jfs.c: Clean up redundant code
>>       osdep/unix/getroot.c: Clean up redundant code
>>       loader/i386/multiboot_mbi.c: Clean up redundant code
>>
>>  grub-core/fs/jfs.c                    | 1 -
>>  grub-core/loader/i386/multiboot_mbi.c | 2 +-
>>  grub-core/osdep/unix/getroot.c        | 1 -
>>  3 files changed, 1 insertion(+), 3 deletions(-)
>>
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

      reply	other threads:[~2024-01-26  8:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-20  2:52 [PATCH 0/3] Clean up unused values Alec Brown
2024-01-20  2:52 ` [PATCH 1/3] fs/jfs.c: Clean up redundant code Alec Brown
2024-01-20  2:52 ` [PATCH 2/3] osdep/unix/getroot.c: " Alec Brown
2024-01-22 14:09   ` Mate Kukri
2024-01-23 14:42     ` Daniel Kiper
2024-01-25 22:35       ` Vladimir 'phcoder' Serbinenko
2024-01-20  2:52 ` [PATCH 3/3] loader/i386/multiboot_mbi.c: " Alec Brown
2024-01-23 13:31 ` [PATCH 0/3] Clean up unused values Daniel Kiper
2024-01-25 22:31 ` Vladimir 'phcoder' Serbinenko
2024-01-26  8:14   ` Nikolaos Chatzikonstantinou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAQmekdPHnWgCUjXQ9n8cO33BiBYQ-siTQZC1ZdNDF4axUhyHA@mail.gmail.com \
    --to=nchatz314@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).