Re: Memory error in src/backend/replication/logical/origin.c

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: Memory error in src/backend/replication/logical/origin.c
Дата
Msg-id 91DFFD71-4D34-488B-B49A-B9F863CB976A@gmail.com
обсуждение исходный текст
Ответ на Re: Memory error in src/backend/replication/logical/origin.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> On Nov 26, 2017, at 10:28 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> Mark Dilger <hornschnorter@gmail.com> writes:
>>        bool        nulls[Natts_pg_replication_origin];
>>            memset(&nulls, 0, sizeof(nulls));
> 
>> around lines 277 through 303.  Patch below.
> 
> AFAIK this is not a bug, though I agree that dropping the "&" is probably
> better style.  The reason is that applying "&" to an undecorated array
> name is basically a no-op, because without "&" the array name would decay
> to a pointer anyway.  With "&", the address-taking is explicit, but you
> still get a pointer to the array, not a pointer to some pointer to the
> array.  Ain't C fun?

Thanks for the refresher on C madness.

mark


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] More stats about skipped vacuums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables