Re: Prevent invalid memory access in LookupFuncName

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Prevent invalid memory access in LookupFuncName
Дата
Msg-id 20190625021956.GE5569@paquier.xyz
обсуждение исходный текст
Ответ на Prevent invalid memory access in LookupFuncName  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
On Mon, Jun 24, 2019 at 11:10:54PM +0300, Alexander Lakhin wrote:
> When running on REL_11_STABLE the following query:
> CREATE PROCEDURE test_ambiguous_procname(int) as $$ begin end; $$
> language plpgsql;
> CREATE PROCEDURE test_ambiguous_procname(text) as $$ begin end; $$
> language plpgsql;
> DROP PROCEDURE test_ambiguous_procname;
> under valgrind I get the memory access errors:

Thanks!  I have been able to reproduce the problem, and the error is
obvious looking at the code.  I have changed the patch to be more
consistent with HEAD though, returning InvalidOid in the code paths
generating the error.  The logic is the same, but that looked cleaner
to me, and I have added some comments on the way, similarly to what
bfb456c1 has done for HEAD (where LookupFuncNameInternal is doing the
right thing already).  This has been incorrect since aefeb68, so
back-patched down to 10.
--
Michael

Вложения

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

Предыдущее
От: Daniel Wood
Дата:
Сообщение: pgbench prints suspect tps numbers
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: old_snapshot_threshold vs indexes