summaryrefslogtreecommitdiffstats
path: root/math/gcalctool3/files
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2011-05-31 07:25:22 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2011-05-31 07:25:22 +0800
commitd8b5fd2069e92c62a2a7730b1dced889cf374a29 (patch)
tree6c31cee09b6431b165b63a2617b658e442ce51c7 /math/gcalctool3/files
parent81de69fda832b900b54e9299aeab527004efc838 (diff)
downloadmarcuscom-ports-d8b5fd2069e92c62a2a7730b1dced889cf374a29.tar
marcuscom-ports-d8b5fd2069e92c62a2a7730b1dced889cf374a29.tar.gz
marcuscom-ports-d8b5fd2069e92c62a2a7730b1dced889cf374a29.tar.bz2
marcuscom-ports-d8b5fd2069e92c62a2a7730b1dced889cf374a29.tar.lz
marcuscom-ports-d8b5fd2069e92c62a2a7730b1dced889cf374a29.tar.xz
marcuscom-ports-d8b5fd2069e92c62a2a7730b1dced889cf374a29.tar.zst
marcuscom-ports-d8b5fd2069e92c62a2a7730b1dced889cf374a29.zip
Fix a stack overflow caused by using threads.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@16016 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'math/gcalctool3/files')
-rw-r--r--math/gcalctool3/files/patch-src_math-equation.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/math/gcalctool3/files/patch-src_math-equation.c b/math/gcalctool3/files/patch-src_math-equation.c
new file mode 100644
index 000000000..14b7577f8
--- /dev/null
+++ b/math/gcalctool3/files/patch-src_math-equation.c
@@ -0,0 +1,25 @@
+--- src/math-equation.c.orig 2011-05-30 19:16:53.000000000 -0400
++++ src/math-equation.c 2011-05-30 19:19:35.000000000 -0400
+@@ -1305,6 +1305,7 @@ void
+ math_equation_solve(MathEquation *equation)
+ {
+ GError *error = NULL;
++ gulong stacksize = 0;
+
+ g_return_if_fail(equation != NULL);
+
+@@ -1326,7 +1327,13 @@ math_equation_solve(MathEquation *equati
+
+ math_equation_set_number_mode(equation, NORMAL);
+
+- g_thread_create(math_equation_solve_real, equation, false, &error);
++ if (GLIB_SIZEOF_LONG == 8) {
++ stacksize = 0x400000;
++ } else {
++ stacksize = 0x200000;
++ }
++
++ g_thread_create_full(math_equation_solve_real, equation, stacksize, false, false, G_THREAD_PRIORITY_NORMAL, &error);
+
+ if (error)
+ g_warning("Error spawning thread for calculations: %s\n", error->message);