OSDN Git Service

Install a workaround for a longstanding gcc bug that allows SIGFPE traps
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Sep 2009 18:48:14 +0000 (18:48 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Sep 2009 18:48:14 +0000 (18:48 +0000)
commitd0a368c65699b32212575bb573474c18c29ddef9
tree8e3614ae42acdba34aca5d719ef4f4fd4a0885c4
parentfc19373993f69bcc26a3910374c4b8689966212d
Install a workaround for a longstanding gcc bug that allows SIGFPE traps
to occur for division by zero, even though the code is carefully avoiding
that.  All available evidence is that the only functions affected are
int24div, int48div, and int28div, so patch just those three functions to
include a "return" after the ereport() call.

Backpatch to 8.4 so that the fix can be tested in production builds.
For older branches our recommendation will continue to be to use -O1
on affected platforms (which are mostly non-mainstream anyway).
src/backend/utils/adt/int.c
src/backend/utils/adt/int8.c