On 27.10.24 04:59, Andy Fan wrote:
I haven't found anything that is a really serious bug, but I imagine you
could run into trouble in various ways when you exceed the INT_MAX
value.  But then again, if you use up INT_MAX WAL timelines, you
probably have other problems. ;-)
Me too, just that want some clean code:) But FWIW, "-Wformat-signedness"
is not supported by clang so far, so if people is using clang, they
still can't benefit from this changes.

clang 19 supports it now.

My soluation (I use clang
everyday) is adding a "gcc-checker" for my c file, if I make such
mistake, it can remind me directly.

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.



Reply via email to