Invalid memory access in pg_stat_get_subscription

Поиск
Список
Период
Сортировка
От Kuntal Ghosh
Тема Invalid memory access in pg_stat_get_subscription
Дата
Msg-id CAGz5QCJykEDzW6jQK6Yz7Qh_PMtD=95de_7QoocbVR2Qy8hWZA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Invalid memory access in pg_stat_get_subscription  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello hackers,

While exploring some code in logical replication worker
implementation, I noticed that we're accessing an invalid memory while
traversing LogicalRepCtx->workers[i].
For the above structure, we're allocating
max_logical_replication_workers times LogicalRepWorker amount of
memory in ApplyLauncherShmemSize. But, in the for loop, we're
accessing the max_logical_replication_workers + 1 location which is
resulting in random crashes.

Please find the patch that fixes the issue. I'm not sure whether we
should add a regression test for the same.

-- 
Thanks & Regards,
Kuntal Ghosh

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How about a psql backslash command to show GUCs?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: pgcon unconference / impact of block size on performance