Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)
Date
Msg-id CAEudQAodxAjFiCXT+Qm17=fcPT_9YhW9qa64cqdorfEXPpT6Dg@mail.gmail.com
Whole thread Raw
In response to Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)
List pgsql-hackers
Em seg., 5 de set. de 2022 às 23:02, David Rowley <dgrowleyml@gmail.com> escreveu:
On Tue, 6 Sept 2022 at 13:52, Ranier Vilela <ranier.vf@gmail.com> wrote:
>
> Em seg., 5 de set. de 2022 às 22:29, David Rowley <dgrowleyml@gmail.com> escreveu:
>> It feels like it would be good if we had a way to detect a few of
>> these issues much earlier than we are currently.  There's been a long
>> series of commits fixing up this sort of thing.  If we had a tool to
>> parse the .c files and look for things like a function call to
>> appendPQExpBuffer() and appendStringInfo() with only 2 parameters (i.e
>> no va_arg arguments).
>
> StaticAssert could check va_arg no?

I'm not sure exactly what you have in mind. If you think you have a
way to make that work, it would be good to see a patch with it.
I will study the matter.
But first, I would like to continue with this correction of using strings.
In the following cases:
fprintf -> fputs -> fputc
printf -> puts -> putchar

There are many occurrences, do you think it would be worth the effort?

regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Next
From: Christoph Berg
Date:
Subject: (doc patch) psql version compatibility