Re: ecpg assertion on windows

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: ecpg assertion on windows
Дата
Msg-id 20220824040118.7jrf5hnszadcscgl@awork3.anarazel.de
обсуждение исходный текст
Ответ на ecpg assertion on windows  (Andres Freund <andres@anarazel.de>)
Ответы Re: ecpg assertion on windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2022-08-23 20:36:55 -0700, Andres Freund wrote:
> Running the ecpg regression tests interactively (to try to find a different
> issue), triggered a crash on windows due to an uninitialized variable (after
> pressing "ignore" in that stupid gui window that we've only disabled for the
> backend).
> 
> "The variable 'replace_val' is being used without being initialized."

Looks to me like that's justified. The paths in dttofmtasc_replace using
PGTYPES_TYPE_NOTHING don't set replace_val, but call pgtypes_fmt_replace() -
with replace_val passed by value. If that's the first replacement, an
unitialized variable is passed...

Seems either the caller should skip calling pgtypes_fmt_replace() in the
NOTHING case, or replace_val should be zero initialized?

- Andres



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: ecpg assertion on windows
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Assertion failure on PG15 with modified test_shm_mq test