[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC
From: |
Marin Ramesa |
Subject: |
Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable |
Date: |
Wed, 18 Dec 2013 10:37:03 +0100 |
On 18.12.2013 10:20:21, Anatoly A. Kazantsev wrote:
> On Wed, 18 Dec 2013 09:17:47 +0100
> Marin Ramesa <mpr@hi.t-com.hr> wrote:
>
> > ...
> > Negation of an
> > OR expression is an AND expression.
> > ...
>
> Maybe I did't get you correctly, but isn't !(a || b) == !a && !b ?
Yes.
> And evaluation of the second condition doesn't happen when entry =
> IE_NULL
Compiler needs to check both !a and !b. In order to evaluate !b it must
evaluate b. So when the code path is that when entry is a null pointer,
the evaluation of b results in a dereference of a null pointer.
- [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18
- [PATCH 2/3] ipc/mach_debug.c (host_ipc_hash_info): quiet GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18
- [PATCH 3/3] vm/vm_debug.c: quiet GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Anatoly A. Kazantsev, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable,
Marin Ramesa <=
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Richard Braun, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Richard Braun, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Richard Braun, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Richard Braun, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Richard Braun, 2013/12/18
- Re: [PATCH 1/3] ipc: avoid dereference of null pointer and quiet the GCC warning about uninitialized variable, Marin Ramesa, 2013/12/18