Incorrect assert in libpqwalreceiver

Поиск
Список
Период
Сортировка
От Jacob Brazeal
Тема Incorrect assert in libpqwalreceiver
Дата
Msg-id CA+COZaA_9afJxj9ZuO73U5P7WXP+ZM9NGnZvTDCmBFz0FGP+wA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Incorrect assert in libpqwalreceiver
Список pgsql-hackers
Hello hackers,

The libpqrcv_connect function asserts 'Assert(i < sizeof(keys))', where keys is declared as const char *keys[6];.

However, sizeof(keys) is not the correct way to check the array length (on my system, for example, it's 48 = 6 * 8 at this callsite, not 6.) 

I attached a patch to fix the assert, but I suppose we could also just remove the assert altogether, since it hasn't been doing anything for at least 8 years.

Regards,
Jacob
Вложения

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