OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/pth?expand=0&rev=19
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
# From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208583
|
|
# Fixes (bnc#413646)
|
|
diff -Naur pth-2.0.0.orig/pth_sched.c pth-2.0.0/pth_sched.c
|
|
--- pth-2.0.0.orig/pth_sched.c 2003-01-01 08:45:06.000000000 -0700
|
|
+++ pth-2.0.0/pth_sched.c 2004-01-27 12:51:59.000000000 -0700
|
|
@@ -290,8 +290,15 @@
|
|
/*
|
|
* Check for stack overflow
|
|
*/
|
|
+#ifndef __ia64__
|
|
if (pth_current->stackguard != NULL) {
|
|
if (*pth_current->stackguard != 0xDEAD) {
|
|
+#else
|
|
+ /* On ia64 the stack grows down but the bottom part is used for register
|
|
+ * backing store which grows up. So we check for a meet in the middle
|
|
+ */
|
|
+ if (pth_current->mctx.uc.uc_mcontext.sc_gr[12] <= pth_current->mctx.uc.uc_mcontext.sc_ar_bsp) {
|
|
+#endif
|
|
pth_debug3("pth_scheduler: stack overflow detected for thread 0x%lx (\"%s\")",
|
|
(unsigned long)pth_current, pth_current->name);
|
|
/*
|
|
@@ -317,7 +324,9 @@
|
|
pth_current->state = PTH_STATE_DEAD;
|
|
kill(getpid(), SIGSEGV);
|
|
}
|
|
+#ifndef __ia64__
|
|
}
|
|
+#endif
|
|
|
|
/*
|
|
* If previous thread is now marked as dead, kick it out
|