aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/postmaster.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-11-19 21:21:40 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-11-19 21:21:40 -0500
commit4387cc9ab4ad7e037df32e93c8435e34b5832cc5 (patch)
treebdc24d72d0a2312ef7e395d7b9aca807400d61d3 /src/backend/postmaster/postmaster.c
parentfe838e5074149058a1101092d3a557e4b86b8ff2 (diff)
downloadpostgresql-4387cc9ab4ad7e037df32e93c8435e34b5832cc5.tar.gz
postgresql-4387cc9ab4ad7e037df32e93c8435e34b5832cc5.zip
Improve handling of INT_MIN / -1 and related cases.
Some platforms throw an exception for this division, rather than returning a necessarily-overflowed result. Since we were testing for overflow after the fact, an exception isn't nice. We can avoid the problem by treating division by -1 as negation. Add some regression tests so that we'll find out if any compilers try to optimize away the overflow check conditions. Back-patch of commit 1f7cb5c30983752ff8de833de30afcaee63536d0. Per discussion with Xi Wang, though this is different from the patch he submitted.
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
0 files changed, 0 insertions, 0 deletions