Re: Invalid memory access in pg_stat_get_subscription

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Invalid memory access in pg_stat_get_subscription
Дата
Msg-id 1265677.1654629283@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Invalid memory access in pg_stat_get_subscription  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Ответы Re: Invalid memory access in pg_stat_get_subscription  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Список pgsql-hackers
Kuntal Ghosh <kuntalghosh.2007@gmail.com> writes:
> 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.

I concur that that's a bug, but eyeing the code, it seems like an
actual crash would be improbable.  Have you seen one?  Can you
reproduce it?

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

How would you make a stable regression test for that?

            regards, tom lane



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

Предыдущее
От: Kaiting Chen
Дата:
Сообщение: Allow foreign keys to reference a superset of unique columns
Следующее
От: Robert Haas
Дата:
Сообщение: Re: pgcon unconference / impact of block size on performance