Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3-0]: src/lib/libc/arch/i386/sys Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/1afd52a77b16
branches:  netbsd-3-0
changeset: 579266:1afd52a77b16
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Aug 03 12:22:49 2006 +0000

description:
Pull up following revision(s) (requested by jld in ticket #1447):
        lib/libc/arch/i386/sys/__sigtramp2.S: revision 1.2
Fix PR 34112, where a program could mysteriously exit on return from a
signal handler, by deriving the context pointer from the stack pointer
instead of trying to read it from where the sigaction function may have
overwritten it with arbitrary bits.
Fix provided by Matthias Drochner in the PR.

diffstat:

 lib/libc/arch/i386/sys/__sigtramp2.S |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r a5212e96dbcf -r 1afd52a77b16 lib/libc/arch/i386/sys/__sigtramp2.S
--- a/lib/libc/arch/i386/sys/__sigtramp2.S      Mon Jul 31 16:36:07 2006 +0000
+++ b/lib/libc/arch/i386/sys/__sigtramp2.S      Thu Aug 03 12:22:49 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: __sigtramp2.S,v 1.1 2003/09/06 22:10:40 christos Exp $ */
+/*     $NetBSD: __sigtramp2.S,v 1.1.10.1 2006/08/03 12:22:49 tron Exp $        */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
  *     sp->    signal number                           [0]
  */
 NENTRY(__sigtramp_siginfo_2)
-       movl    8(%esp),%eax    /* get pointer to ucontext */
+       leal    12+128(%esp),%eax       /* get pointer to ucontext */
        movl    %eax,4(%esp)    /* put it in the argument slot */
                                /* fake return address already there */
        SYSTRAP(setcontext)     /* do setcontext */



Home | Main Index | Thread Index | Old Index