Re: Dereference before NULL check (src/backend/storage/ipc/latch.c)

Поиск
Список
Период
Сортировка
Искать
От
Kyotaro Horiguchi
Тема
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c)
Дата
Msg-id
20201102.094947.1977932024472564724.horikyota.ntt@gmail.com
Ответ на
Список
Дерево обсуждения
Dereference before NULL check (src/backend/storage/ipc/latch.c) Ranier Vilela <ranier.vf@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Thomas Munro <thomas.munro@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Thomas Munro <thomas.munro@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Ranier Vilela <ranier.vf@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Thomas Munro <thomas.munro@gmail.com>
Re: Dereference before NULL check (src/backend/storage/ipc/latch.c) Ranier Vilela <ranier.vf@gmail.com>
At Sat, 31 Oct 2020 11:40:53 -0300, Ranier Vilela  wrote in 
> Hi,
> 
> Per Coverity.
> 
> If test set->latch against NULL, is why it can be NULL.
> ResetEvent can dereference NULL.

If the returned event is WL_LATCH_SET, set->latch cannot be NULL. We
shouldn't inadvertently ignore the unexpected or broken situation.We
could put Assert instead, but I think that we don't need do something
here at all since SIGSEGV would be raised at the right location.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления
От: osumi.takamichi@fujitsu.com
Дата:
От: David Rowley
Дата:
FAQ