Re: -Wformat-signedness
От | Peter Eisentraut |
---|---|
Тема | Re: -Wformat-signedness |
Дата | |
Msg-id | a37346d0-96d0-42f1-a5d9-8f31872818c6@eisentraut.org обсуждение исходный текст |
Ответ на | -Wformat-signedness (Thomas Munro <thomas.munro@gmail.com>) |
Список | pgsql-hackers |
On 29.10.24 07:51, Michael Paquier wrote: > On Tue, Oct 29, 2024 at 07:38:36AM +0100, Peter Eisentraut wrote: >> I think it could be useful to set up some better test coverage for various >> things overflowing signed integer maximums. For example, maybe you could >> hack initdb to advance the OID counter to INT32_MAX+1 or thereabouts and run >> the test suites from there. That would also catch things like inappropriate >> uses of atoi(), things beyond just the format strings. > > Fun. One way to be fancy here would be to force a pg_resetwal > --next-oid in some of the test paths (Cluster.pm and/or pg_regress) > with an environment variable to force the command to trigger across > the board for all the clusters created in the tests. initdb cannot be > used here as the TAP tests reuse a cluster already initdb'd to save > time. No need to touch at pg_regress, either, as we could count on the > pg_regress runs in 002_pg_upgrade.pl and 027_stream_regress.pl. I was thinking just compiling with a patch like this: -#define FirstNormalObjectId 16384 +#define FirstNormalObjectId ((Oid) INT_MAX + 1) Already found one bug: pg_checksums --filenode only accepts files up to INT_MAX.
В списке pgsql-hackers по дате отправления: