Re: [PATCH] Fix buffer not null terminated on (ecpg lib)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Fix buffer not null terminated on (ecpg lib)
Дата
Msg-id 2132305.1623452937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Fix buffer not null terminated on (ecpg lib)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> It might be worth doing something about this, for other reasons. We have
> disabled -Wstringop-truncation in 716585235b1. But I've enabled it in my
> debug build, because I find it useful.

ITYM e71658523 ?  I can't find that hash in my repo.  Anyway, I agree
that disabling that was a bit of a stopgap hack.  This 'nonstring'
attribute seems like it would help for ECPG's usage, at least.

> I've not looked at how much work it'd be to make a recent-ish gcc not to
> produce lots of false positives in optimized builds.

The discussion that led up to e71658523 seemed to conclude that the
only reasonable way to suppress the majority of those warnings was
to get rid of the fixed-length MAXPGPATH buffers we use everywhere.
Now that we have psprintf(), that might be more workable than before,
but the effort-to-reward ratio still doesn't seem promising.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] Fix buffer not null terminated on (ecpg lib)
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: unnesting multirange data types