[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] kern/processor.c: check if threads is NULL
From: |
Marin Ramesa |
Subject: |
Re: [PATCH 3/5] kern/processor.c: check if threads is NULL |
Date: |
Tue, 19 Nov 2013 21:15:10 +0100 |
On 19.11.2013 20:49:37, Samuel Thibault wrote:
> This is a false positive: what the analyzer doesn't know is that
> pset->thread_count is number of elements in the pset->threads queue.
> I.e. actual is only ever set to 0 when the pset->threads queue is
> empty, and thus no iteration of the loop is done.
[...]
> This kind of fix would almost never be a proper one: as I explained
> earlier, you have to look with a more global view: start with the
> tracing exposed on the analysis webpage, which shows where things
> come from: the actual variable. And that's where we know it can't
> happen.
OK, thanks. I will look at the code again. More carefully this time.
- More patches based on clang reports, Marin Ramesa, 2013/11/19
- [PATCH 2/5] kern/slab.c: initialize info_size, Marin Ramesa, 2013/11/19
- [PATCH 3/5] kern/processor.c: check if threads is NULL, Marin Ramesa, 2013/11/19
- [PATCH 5/5] vm/vm_fault.c: check if active_threads is NULL, Marin Ramesa, 2013/11/19
- [PATCH 4/5] vm/vm_fault.c: check if active_threads is NULL, Marin Ramesa, 2013/11/19