summaryrefslogtreecommitdiff
path: root/patches/gmp/4.3.1/110-unbounded-alloc.patch
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-08-03 06:50:56 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-08-03 06:50:56 (GMT)
commit946a86fb675935229f264dfcad53fef66ee98442 (patch)
treeb2afdd8b2d0e6b571a1eb64a3f0944d61f24039e /patches/gmp/4.3.1/110-unbounded-alloc.patch
parent70f87b89699f1ed99d14a174d0a32f3aa1ecb653 (diff)
parent33ed1557b64e4449fbb368993f048a8f32678f0f (diff)
[config] Merge CONFIG_SHELL selection.
Diffstat (limited to 'patches/gmp/4.3.1/110-unbounded-alloc.patch')
-rw-r--r--patches/gmp/4.3.1/110-unbounded-alloc.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/gmp/4.3.1/110-unbounded-alloc.patch b/patches/gmp/4.3.1/110-unbounded-alloc.patch
new file mode 100644
index 0000000..78e0588
--- /dev/null
+++ b/patches/gmp/4.3.1/110-unbounded-alloc.patch
@@ -0,0 +1,31 @@
+diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c
+--- a/mpn/generic/toom44_mul.c
++++ b/mpn/generic/toom44_mul.c
+@@ -116,17 +116,16 @@
+
+ TMP_MARK;
+
+- as1 = TMP_SALLOC_LIMBS (n + 1);
+- asm1 = TMP_SALLOC_LIMBS (n + 1);
+- as2 = TMP_SALLOC_LIMBS (n + 1);
+- ash = TMP_SALLOC_LIMBS (n + 1);
+- asmh = TMP_SALLOC_LIMBS (n + 1);
+-
+- bs1 = TMP_SALLOC_LIMBS (n + 1);
+- bsm1 = TMP_SALLOC_LIMBS (n + 1);
+- bs2 = TMP_SALLOC_LIMBS (n + 1);
+- bsh = TMP_SALLOC_LIMBS (n + 1);
+- bsmh = TMP_SALLOC_LIMBS (n + 1);
++ as1 = TMP_ALLOC_LIMBS (10 * n + 10);
++ asm1 = as1 + n + 1;
++ as2 = asm1 + n + 1;
++ ash = as2 + n + 1;
++ asmh = ash + n + 1;
++ bs1 = asmh + n + 1;
++ bsm1 = bs1 + n + 1;
++ bs2 = bsm1 + n + 1;
++ bsh = bs2 + n + 1;
++ bsmh = bsh + n + 1;
+
+ gp = pp;
+ hp = pp + n + 1;