lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMZ6Rq+J0CH_HvK1ax=VcWKqih+B_0Nfoc9jZMiq7OtuXL06hw@mail.gmail.com>
Date:   Wed, 2 Mar 2022 23:42:53 +0900
From:   Vincent MAILHOL <mailhol.vincent@...adoo.fr>
To:     Marc Kleine-Budde <mkl@...gutronix.de>
Cc:     kernel test robot <yujie.liu@...el.com>, kbuild-all@...ts.01.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arunachalam Santhanam <Arunachalam.Santhanam@...bosch.com>,
        linux-can <linux-can@...r.kernel.org>
Subject: Re: drivers/net/can/usb/etas_es58x/es58x_fd.c:174:8: warning:
 Uninitialized variable: rx_event_msg [uninitvar]

On Wed. 2 Mar 2022 at 22:04, Marc Kleine-Budde <mkl@...gutronix.de> wrote:
> I was thinking of this:
>
> | void *foo = bar->baz;
> |
> | if (!bar)
> |         return;
> |
> | printf("%p", foo);
>
> There were/are compilers that optimize the bar NULL pointer check away,
> because bar has already been de-referenced.

Sorry, I do not get your example. If bar is NULL,
| void *foo = bar->baz;
would segfault and thus the check is not reached.

If bar is not NULL, the check succeeds.

In both cases, the return statement of the if branch is never
executed making this some dead code. So I do not see why this is
an issue if the compiler removes it.


Yours sincerely,
Vincent Mailhol

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ