1 |
vapier 07/12/10 01:23:00 |
2 |
|
3 |
Added: |
4 |
0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch |
5 |
Log: |
6 |
snip random fix from upstream |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 src/patchsets/glibc/2.7/0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch |
10 |
|
11 |
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 |
12 |
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 |
13 |
|
14 |
Index: 0060_all_glibc-2.7-i386-makecontext-align-BZ5435.patch |
15 |
=================================================================== |
16 |
2007-12-03 Ulrich Drepper <drepper@××××××.com> |
17 |
|
18 |
[BZ #5435] |
19 |
* sysdeps/unix/sysv/linux/i386/makecontext.S: Align stack. |
20 |
|
21 |
Index: sysdeps/unix/sysv/linux/i386/makecontext.S |
22 |
=================================================================== |
23 |
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/makecontext.S,v |
24 |
retrieving revision 1.7 |
25 |
retrieving revision 1.8 |
26 |
diff -u -p -r1.7 -r1.8 |
27 |
--- sysdeps/unix/sysv/linux/i386/makecontext.S 26 May 2005 14:30:47 -0000 1.7 |
28 |
+++ sysdeps/unix/sysv/linux/i386/makecontext.S 3 Dec 2007 04:56:56 -0000 1.8 |
29 |
@@ -35,11 +35,6 @@ ENTRY(__makecontext) |
30 |
movl %ecx, oEIP(%eax) |
31 |
addl oSS_SIZE(%eax), %edx |
32 |
|
33 |
- /* Put the next context on the new stack (from the uc_link |
34 |
- element). */ |
35 |
- movl oLINK(%eax), %ecx |
36 |
- movl %ecx, -4(%edx) |
37 |
- |
38 |
/* Remember the number of parameters for the exit handler since |
39 |
it has to remove them. We store the number in the EBX register |
40 |
which the function we will call must preserve. */ |
41 |
@@ -50,9 +45,20 @@ ENTRY(__makecontext) |
42 |
negl %ecx |
43 |
leal -8(%edx,%ecx,4), %edx |
44 |
negl %ecx |
45 |
+ |
46 |
+ /* Align the stack. */ |
47 |
+ addl $16, %edx |
48 |
+ andl $0xfffffff0, %edx |
49 |
+ subl $4, %edx |
50 |
+ |
51 |
/* Store the future stack pointer. */ |
52 |
movl %edx, oESP(%eax) |
53 |
|
54 |
+ /* Put the next context on the new stack (from the uc_link |
55 |
+ element). */ |
56 |
+ movl oLINK(%eax), %eax |
57 |
+ movl %eax, 4(%edx,%ecx,4) |
58 |
+ |
59 |
/* Copy all the parameters. */ |
60 |
jecxz 2f |
61 |
1: movl 12(%esp,%ecx,4), %eax |
62 |
|
63 |
|
64 |
|
65 |
-- |
66 |
gentoo-commits@g.o mailing list |