]> granicus.if.org Git - postgresql/commit
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:21 +0000 (18:48 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Sep 2009 18:48:21 +0000 (18:48 +0000)
commit828fc43c8c69f6f601c5ebc3a76b9dda5fcebaf6
tree7e7a304dd716bbce734a24e5fa7f0cc17b1b2c06
parent0f240ce595d3e96b6bfd2ca64dde02cde5fe04b9
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