Re: Possible dereference null return (src/backend/replication/logical/reorderbuffer.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible dereference null return (src/backend/replication/logical/reorderbuffer.c)
Date: 2021-02-13 20:40:38
Message-ID: CAEudQArcFOF0O5_+K6nMzdQC+38j2UTQoiBcv7LTKxTESdVb8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em sáb., 13 de fev. de 2021 às 17:35, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
escreveu:

>
> Em sáb., 13 de fev. de 2021 às 01:07, Zhihong Yu <zyu(at)yugabyte(dot)com>
> escreveu:
>
>> Hi,
>> How about the following patch ?
>>
>> ReorderBufferSetBaseSnapshot() can return a bool to indicate whether the
>> base snapshot is set up.
>>
>> For the call by SnapBuildCommitTxn(), it seems xid is top transaction. So
>> the return value doesn't need to be checked.
>>
> IMO anything else is better than PANIC.
> Anyway, if all fails, reporting an error can contribute to checking where.
>
> Attached a patch suggestion v2.
>
Sorry, I forgot to mention, it is based on a patch from Zhihong Yu.

regards,
Ranier Vilela

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-02-13 20:50:48 Re: Possible dereference null return (src/backend/replication/logical/reorderbuffer.c)
Previous Message Ranier Vilela 2021-02-13 20:37:32 Re: pg_cryptohash_final possible out-of-bounds access (per Coverity)