public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-libs/pth/files: pth-2.0.7-ia64.patch
@ 2011-04-09 13:49 Raul Porcel (armin76)
  0 siblings, 0 replies; only message in thread
From: Raul Porcel (armin76) @ 2011-04-09 13:49 UTC (permalink / raw
  To: gentoo-commits

armin76     11/04/09 13:49:35

  Added:                pth-2.0.7-ia64.patch
  Log:
  Add a new revision that provides a workaround for bug #350815, and a patch for ia64. Straight to stable for arm/ia64/sh
  
  (Portage version: 2.1.9.44/cvs/Linux ia64, RepoMan options: --force)

Revision  Changes    Path
1.1                  dev-libs/pth/files/pth-2.0.7-ia64.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/pth/files/pth-2.0.7-ia64.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/pth/files/pth-2.0.7-ia64.patch?rev=1.1&content-type=text/plain

Index: pth-2.0.7-ia64.patch
===================================================================
# http://bugs.debian.org/225780
diff -Naurp pth.orig/pth_sched.c pth/pth_sched.c
--- pth.orig/pth_sched.c	2009-07-16 23:16:52.000000000 +0000
+++ pth/pth_sched.c	2009-07-16 23:20:51.000000000 +0000
@@ -297,8 +297,15 @@ intern void *pth_scheduler(void *dummy)
         /*
          * 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);
                 /*
@@ -324,7 +331,9 @@ intern void *pth_scheduler(void *dummy)
                 pth_current->state = PTH_STATE_DEAD;
                 kill(getpid(), SIGSEGV);
             }
+#ifndef __ia64__
         }
+#endif
 
         /*
          * If previous thread is now marked as dead, kick it out






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-09 13:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-09 13:49 [gentoo-commits] gentoo-x86 commit in dev-libs/pth/files: pth-2.0.7-ia64.patch Raul Porcel (armin76)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox