Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb50fb5

Browse files
committed
This patch will avoid SIGFPE on some geo functions , if PostgreSQL is compiled
with DEC C.DEC C doesn't handle double values greater than DBL_MAX, but somePostgreSQL geo functions assign greater than DBL_MAX values to some varsin some special cases - that couses SIGFPE. I dunno if that is the only placeto fix to work well with DEC C.Kirill Nosov.
1 parent04c78e2 commitbb50fb5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/utils/adt/geo_ops.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.45 1999/07/17 20:17:56 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.46 1999/12/2117:01:44 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -876,7 +876,10 @@ line_construct_pm(Point *pt, double m)
876876
/* use "mx - y + yinter = 0" */
877877
result->A=m;
878878
result->B=-1.0;
879-
result->C=pt->y-m*pt->x;
879+
if (m==DBL_MAX)
880+
result->C=pt->y;
881+
else
882+
result->C=pt->y-m*pt->x;
880883

881884
#ifdefNOT_USED
882885
result->m=m;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp