Author: aurel32
Date: 2010-02-05 20:12:38 +0000 (Fri, 05 Feb 2010)
New Revision: 4135

Added:
   glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * Add patches/ia64/submitted-memchr.diff to fix memchr() overshoot on ia64.
    Closes: #563882



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2010-02-03 15:34:33 UTC (rev 
4134)
+++ glibc-package/trunk/debian/changelog        2010-02-05 20:12:38 UTC (rev 
4135)
@@ -10,6 +10,8 @@
     Closes: #565369.
   * debian/rules.d/build.mk: Add --with-pkgversion and --with-bugurl
     arguments.
+  * Add patches/ia64/submitted-memchr.diff to fix memchr() overshoot on ia64.
+    Closes: #563882
 
   [ Samuel Thibault ]
   * patches/hurd-i386/local-pthread.diff: New hurd-only patch to provide
@@ -24,7 +26,7 @@
   * patches/hurd-i386/submitted-getnprocs.diff: New patch to add get_nprocs()
     and such weak aliases.
 
- -- Aurelien Jarno <aure...@debian.org>  Sat, 23 Jan 2010 18:27:05 +0100
+ -- Aurelien Jarno <aure...@debian.org>  Fri, 05 Feb 2010 21:11:00 +0100
 
 eglibc (2.10.2-5) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff
===================================================================
--- glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff               
                (rev 0)
+++ glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff       
2010-02-05 20:12:38 UTC (rev 4135)
@@ -0,0 +1,39 @@
+2010-02-05  H.J. Lu  <hongjiu...@intel.com>
+
+       PR libc/11230
+       * sysdeps/ia64/memchr.S: Don't read beyond the last byte
+       during recovery.
+
+diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S
+index cdd71ca..56d8056 100644
+--- a/sysdeps/ia64/memchr.S
++++ b/sysdeps/ia64/memchr.S
+@@ -47,7 +47,7 @@
+ #define saved_lc      r16
+ #define       chr             r17
+ #define len           r18
+-#define pos0          r20
++#define last          r20
+ #define val           r21
+ #define tmp           r24
+ #define chrx8         r25
+@@ -67,6 +67,7 @@ ENTRY(__memchr)
+       mov     saved_pr = pr           // save the predicates
+       .body
+       mov     ret0 = str
++      add     last = str, in2         // last byte
+       and     tmp = 7, str            // tmp = str % 8
+       cmp.ne  p7, p0 = r0, r0         // clear p7
+       extr.u  chr = in1, 0, 8         // chr = (unsigned char) in1
+@@ -143,7 +144,10 @@ ENTRY(__memchr)
+       ld8     tmp = [ret0];;          // load the first unchecked 8byte
+       xor     aux[1] = tmp, chrx8;;
+       czx1.r  poschr[1] = aux[1];;
+-      cmp.ne  p7, p0 = 8, poschr[1]
++      cmp.ne  p7, p0 = 8, poschr[1];;
++(p7)  add     ret0 = addr[MEMLAT+2], poschr[1];;
++(p7)  cmp.geu p6, p7 = ret0, last     // don't go over the last byte
++(p6)  br.cond.spnt    .notfound;;
+ (p7)  br.cond.spnt    .foundit;;
+       adds    ret0 = 8, ret0          // load the next unchecked 8byte
+       br.sptk .l4;;

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2010-02-03 15:34:33 UTC (rev 
4134)
+++ glibc-package/trunk/debian/patches/series   2010-02-05 20:12:38 UTC (rev 
4135)
@@ -119,6 +119,7 @@
 ia64/submitted-libm.diff
 ia64/submitted-siginfo.diff
 ia64/cvs-memchr.diff
+ia64/submitted-memchr.diff
 
 i386/local-biarch.diff
 i386/local-clone.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to