[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8931 - in /fsf/trunk/ports: ChangeLog.m68k sysdeps/m68k/__longjmp.c sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
- To: commits@xxxxxxxxxx
- Subject: [commits] r8931 - in /fsf/trunk/ports: ChangeLog.m68k sysdeps/m68k/__longjmp.c sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
- From: eglibc@xxxxxxxxxx
- Date: Mon, 07 Sep 2009 07:04:34 -0000
Author: eglibc
Date: Mon Sep 7 00:04:33 2009
New Revision: 8931
Log:
Import glibc-ports-mainline for 2009-09-07
Added:
fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
Modified:
fsf/trunk/ports/ChangeLog.m68k
fsf/trunk/ports/sysdeps/m68k/__longjmp.c
Modified: fsf/trunk/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/ports/ChangeLog.m68k (original)
+++ fsf/trunk/ports/ChangeLog.m68k Mon Sep 7 00:04:33 2009
@@ -1,3 +1,9 @@
+2009-09-06 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c: New file.
+
+ * sysdeps/m68k/__longjmp.c (__longjmp): Call CHECK_SP if defined.
+
2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/Versions (libc): Add
Modified: fsf/trunk/ports/sysdeps/m68k/__longjmp.c
==============================================================================
--- fsf/trunk/ports/sysdeps/m68k/__longjmp.c (original)
+++ fsf/trunk/ports/sysdeps/m68k/__longjmp.c Mon Sep 7 00:04:33 2009
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1997, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,6 +27,10 @@
{
/* This restores the FP and SP that setjmp's caller had,
and puts the return address into A0 and VAL into D0. */
+
+#ifdef CHECK_SP
+ CHECK_SP (env[0].__sp);
+#endif
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* Restore the floating-point registers. */
Added: fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c (added)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c Mon Sep 7 00:04:33 2009
@@ -1,0 +1,39 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdio.h>
+#include <signal.h>
+#include <sysdep.h>
+#define __longjmp ____longjmp_chk
+#define CHECK_SP(sp) \
+ do { \
+ register unsigned long this_sp asm ("sp"); \
+ if ((unsigned long) (sp) < this_sp) \
+ { \
+ struct sigaltstack oss; \
+ INTERNAL_SYSCALL_DECL (err); \
+ int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss); \
+ if (!INTERNAL_SYSCALL_ERROR_P (result, err) \
+ && ((oss.ss_flags & SS_ONSTACK) == 0 \
+ || ((unsigned long) oss.ss_sp + oss.ss_size \
+ - (unsigned long) (sp)) < oss.ss_size)) \
+ __fortify_fail ("longjmp causes uninitialized stack frame"); \
+ } \
+ } while (0)
+
+#include <__longjmp.c>