summaryrefslogtreecommitdiff
path: root/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-02-24 11:00:05 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-02-24 11:00:05 (GMT)
commit1906cf93f86d8d66f45f90380a8d3da25c087ee5 (patch)
tree90916c99abe1f1ec26709ee420e6c349eda4670a /patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch
parent2609573aede4ce198b3462976725b25eb1637d2e (diff)
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!". Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup. That means I'm putting backups in place in the afternoon. That also means we've lost history... :-(
Diffstat (limited to 'patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch')
-rw-r--r--patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch b/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch
new file mode 100644
index 0000000..51de6c8
--- /dev/null
+++ b/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch
@@ -0,0 +1,39 @@
+http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sh/socket.S.diff?r1=1.5&r2=1.6&cvsroot=glibc
+
+Ankur Sheth said:
+"The problem that I ran into was that multi-threaded apps would crash with a
+seg fault when they invoked some of the socket calls (sendto() in my case.
+This happened only on the sh4. Turns out that a certain register (PR) was
+not being saved and restored properly before and after invoking the system
+call. This patch fixes it. It applies cleanly on glibc 2.3.2.
+[Thanks to Kaz for helping us find this.]"
+
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sh/socket.S,v
+retrieving revision 1.5
+retrieving revision 1.6
+diff -u -r1.5 -r1.6
+--- libc/sysdeps/unix/sysv/linux/sh/socket.S 2003/01/05 11:07:44 1.5
++++ libc/sysdeps/unix/sysv/linux/sh/socket.S 2003/07/12 01:25:53 1.6
+@@ -94,7 +94,9 @@
+ #if defined NEED_CANCELLATION && defined CENABLE
+ .Lsocket_cancel:
+ /* Enable asynchronous cancellation. */
++ sts.l pr,@-r15
+ CENABLE
++ lds.l @r15+,pr
+
+ /* Do the system call trap. */
+ mov #+P(SOCKOP_,socket), r4
+@@ -102,9 +104,11 @@
+ mov.l .L1,r3
+ trapa #0x12
+
++ sts.l pr,@-r15
+ mov.l r0,@-r15
+ CDISABLE
+ mov.l @r15+,r0
++ lds.l @r15+,pr
+
+ /* Pop args off the stack */
+ P(POPARGS_,NARGS)