From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Andy Fan <zhihuifan1213(at)163(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
Subject: | Re: -Wformat-signedness |
Date: | 2024-10-29 08:33:54 |
Message-ID: | a37346d0-96d0-42f1-a5d9-8f31872818c6@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-10-29 08:47:30 | Re: Support regular expressions with nondeterministic collations |
Previous Message | jian he | 2024-10-29 08:28:46 | Re: general purpose array_sort |