aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2009-01-10 07:39:16 +0800
committermaho <maho@FreeBSD.org>2009-01-10 07:39:16 +0800
commit6792b9e6e3ccef10133b981a0abb428def671759 (patch)
treeecf5ffd18b1e98abb0d6c9af7e726d4be141a663 /math
parent97bd665f6c8972b9162a24f917d2c2a73c52cb90 (diff)
downloadfreebsd-ports-gnome-6792b9e6e3ccef10133b981a0abb428def671759.tar.gz
freebsd-ports-gnome-6792b9e6e3ccef10133b981a0abb428def671759.tar.zst
freebsd-ports-gnome-6792b9e6e3ccef10133b981a0abb428def671759.zip
Fix segfault for very large systems
(1,000,000 dofs and more). http://groups.yahoo.com/group/calculix/message/5018 Submitted by: "Pedro F. Giffuni"
Diffstat (limited to 'math')
-rw-r--r--math/spooles/Makefile2
-rw-r--r--math/spooles/files/patch-I2Ohash+src+util.c34
2 files changed, 35 insertions, 1 deletions
diff --git a/math/spooles/Makefile b/math/spooles/Makefile
index 646dc484a37b..80e0b1e8cce8 100644
--- a/math/spooles/Makefile
+++ b/math/spooles/Makefile
@@ -7,7 +7,7 @@
PORTNAME= spooles
PORTVERSION= 2.2
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= math
MASTER_SITES= http://www.netlib.org/linalg/spooles/
.ifdef WITH_MPI
diff --git a/math/spooles/files/patch-I2Ohash+src+util.c b/math/spooles/files/patch-I2Ohash+src+util.c
new file mode 100644
index 000000000000..3a9522ab22ef
--- /dev/null
+++ b/math/spooles/files/patch-I2Ohash+src+util.c
@@ -0,0 +1,34 @@
+--- I2Ohash/src/util.c.orig 2008-12-27 21:44:52.000000000 -0500
++++ I2Ohash/src/util.c 2008-12-27 21:52:46.000000000 -0500
+@@ -39,7 +39,8 @@
+ */
+ loc1 = (key1 + 1) % hashtable->nlist ;
+ loc2 = (key2 + 1) % hashtable->nlist ;
+-loc = (loc1*loc2) % hashtable->nlist ;
++long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
++loc =(int) loc3;
+ #if MYDEBUG > 0
+ fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
+ fflush(stdout) ;
+@@ -50,7 +51,7 @@
+ --------------------------------------------------------
+ */
+ #if MYDEBUG > 0
+-fprintf(stdout, "\n hashtable->freeI2OP = %p", hashtable->freeI2OP) ;
++fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
+ fflush(stdout) ;
+ #endif
+ if ( (i2op = hashtable->freeI2OP) == NULL ) {
+@@ -158,9 +159,10 @@
+ #endif
+ loc1 = (key1 + 1) % hashtable->nlist ;
+ loc2 = (key2 + 1) % hashtable->nlist ;
+-loc = (loc1*loc2) % hashtable->nlist ;
++long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
++loc =(int) loc3;
+ #if MYDEBUG > 0
+-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
++fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
+ fflush(stdout) ;
+ #endif
+ /*