mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-11 15:50:06 +00:00
parent
d90d025691
commit
51bd20d93a
@ -1,5 +1,8 @@
|
||||
2007-12-03 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #5435]
|
||||
* sysdeps/unix/sysv/linux/i386/makecontext.S: Align stack.
|
||||
|
||||
* stdlib/tst-setcontext.c: Catch the case where the links gets
|
||||
messed up and we do not reach main again.
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user