* [gentoo-commits] gentoo commit in src/patchsets/glibc/2.7: 0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch
@ 2007-12-10 1:23 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2007-12-10 1:23 UTC (permalink / raw
To: gentoo-commits
vapier 07/12/10 01:23:00
Added:
0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch
Log:
snip random fix from upstream
Revision Changes Path
1.1 src/patchsets/glibc/2.7/0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch?rev=1.1&content-type=text/plain
Index: 0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch
===================================================================
2007-12-03 Ulrich Drepper <drepper@redhat.com>
[BZ #5435]
* sysdeps/unix/sysv/linux/i386/makecontext.S: Align stack.
Index: sysdeps/unix/sysv/linux/i386/makecontext.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/makecontext.S,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- sysdeps/unix/sysv/linux/i386/makecontext.S 26 May 2005 14:30:47 -0000 1.7
+++ sysdeps/unix/sysv/linux/i386/makecontext.S 3 Dec 2007 04:56:56 -0000 1.8
@@ -35,11 +35,6 @@ ENTRY(__makecontext)
movl %ecx, oEIP(%eax)
addl oSS_SIZE(%eax), %edx
- /* Put the next context on the new stack (from the uc_link
- element). */
- movl oLINK(%eax), %ecx
- movl %ecx, -4(%edx)
-
/* Remember the number of parameters for the exit handler since
it has to remove them. We store the number in the EBX register
which the function we will call must preserve. */
@@ -50,9 +45,20 @@ ENTRY(__makecontext)
negl %ecx
leal -8(%edx,%ecx,4), %edx
negl %ecx
+
+ /* Align the stack. */
+ addl $16, %edx
+ andl $0xfffffff0, %edx
+ subl $4, %edx
+
/* Store the future stack pointer. */
movl %edx, oESP(%eax)
+ /* Put the next context on the new stack (from the uc_link
+ element). */
+ movl oLINK(%eax), %eax
+ movl %eax, 4(%edx,%ecx,4)
+
/* Copy all the parameters. */
jecxz 2f
1: movl 12(%esp,%ecx,4), %eax
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-10 1:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-10 1:23 [gentoo-commits] gentoo commit in src/patchsets/glibc/2.7: 0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox