TEST RELEASE: Cygwin 2.1.0-0.4
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Jul 15 12:44:00 GMT 2015
On Jul 15 09:51, Corinna Vinschen wrote:
> Hi guys,
>
> On Jul 14 22:07, Ken Brown wrote:
> > Entering directory
> > '/home/kbrown/src/cyglibsigsegv/libsigsegv-2.10-1.x86_64/build/tests'
> > Test passed.
> > PASS: sigsegv1.exe
> > Test passed.
> > PASS: sigsegv2.exe
> > Doing SIGSEGV pass 1.
> > Stack overflow 1 caught.
> > Doing SIGSEGV pass 2.
> > Stack overflow 2 caught.
> > Test passed.
> > PASS: sigsegv3.exe
> > SKIP: stackoverflow1.exe
> > SKIP: stackoverflow2.exe
>
> Any idea why these two tests have been skipped? That means the
> HAVE_STACK_OVERFLOW_RECOVERY autoconf test failed. You removed cygwin
> from the explicit
>
> mingw* | cygwin*) sv_cv_have_stack_overflow_recovery=yes ;;
>
> which is the right thing to do, but that means CFG_LEAVE has been
> set to leave-none.c, apparently.
>
> I haven't much time to look into that right now, but will later today if
> you don't beat me to it.
Got it. What's needed is a Cygwin-specific fault-*.h file which exposes
how to fetch the stack pointer register from mcontext_t. As you can see
from the plethora of fault-*.h files in the src subdir, this is highly
system-specific anyway.
Here's the set of files you need to rebuild libsigsegv for Cygwin 2.1.0,
with all tests running and passing on i686 and x86_64. No other patch
is requied.
So, who of you is going to maintain it?
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
NAME="libsigsegv"
VERSION="2.10"
RELEASE=2
CATEGORY=Libs
SUMMARY="Handling page faults in user mode"
DESCRIPTION="Library for handling page faults in user mode. A page fault occurs
when a program tries to access to a region of memory that is currently not
available. Mainly required to build clisp from source."
HOMEPAGE="http://libsigsegv.sourceforge.net/"
# SRC_URI="ftp://www.gnu.ftp.uni-erlangen.de/pub/gnu/${PN}/${PN}-${PV}.tar.gz"
# SRC_URI="http://puzzle.dl.sourceforge.net/sourceforge/${PN}/${PN}-${PV}.tar.bz2"
# SRC_URI="ftp://ftp.gnu.org/pub/gnu/${PN}/${PN}-${PV}.tar.gz"
SRC_URI="http://ftpmirror.gnu.org/${PN}/${PN}-${PV}.tar.gz"
DLLREV=2
MAKEOPTS="-j1"
CYGCONF_ARGS="--enable-shared"
PKG_NAMES="${PN} ${PN}${DLLREV}"
PKG_CONTENTS[0]="--exclude=usr/bin/cygsigsegv-${DLLREV}.dll usr"
PKG_CONTENTS[1]="usr/bin/cygsigsegv-${DLLREV}.dll"
-------------- next part --------------
--- origsrc/libsigsegv-2.10/configure.ac 2011-04-03 17:30:16.000000000 +0200
+++ src/libsigsegv-2.10/configure.ac 2015-07-15 14:30:22.264452393 +0200
@@ -419,6 +419,9 @@ if test -z "$CFG_FAULT" && test "$sv_cv_
;;
esac
;;
+ cygwin*)
+ CFG_FAULT=fault-cygwin-i386.h
+ ;;
*)
CFG_FAULT=fault-posix-ucontext.h
;;
@@ -522,16 +525,6 @@ case "$host_os" in
FAULT_CONTEXT_INCLUDE='#include <windows.h>'
CFG_FAULT=fault-win32.h # nonexistent, just a dummy
;;
- cygwin*)
- FAULT_CONTEXT='CONTEXT'
- FAULT_CONTEXT_INCLUDE='#include <windows.h>'
- # Cygwin 1.7 uses fault-posix.h. Cygwin 1.5.x needs a hacky workaround.
- if test -z "$CFG_FAULT"; then
- CFG_FAULT=fault-cygwin-old.h
- AC_DEFINE([OLD_CYGWIN_WORKAROUND], [1],
- [Define to 1 on Cygwin versions older than 1.7.])
- fi
- ;;
esac
if test -n "$CFG_FAULT"; then
sv_cv_have_sigsegv_recovery=yes
@@ -858,7 +851,7 @@ AC_CACHE_CHECK([if the system supports c
sv_cv_have_stack_overflow_recovery=yes
else
case "$host_os" in
- mingw* | cygwin*) sv_cv_have_stack_overflow_recovery=yes ;;
+ mingw*) sv_cv_have_stack_overflow_recovery=yes ;;
*)
if test "$CFG_LEAVE" != 'leave-none.c'; then
if test "$sv_cv_sigaltstack" != no; then
@@ -927,7 +920,7 @@ dnl Requires AC_CANONICAL_HOST, CFG_HAND
dnl HAVE_SIGSEGV_RECOVERY, HAVE_STACK_OVERFLOW_RECOVERY.
case "$host_os" in
- mingw* | cygwin*) CFG_HANDLER=handler-win32.c ;;
+ mingw*) CFG_HANDLER=handler-win32.c ;;
*)
if test -z "$CFG_HANDLER"; then
if test $sv_cv_have_sigsegv_recovery = no \
--- origsrc/libsigsegv-2.10/src/fault-cygwin-i386.h 1970-01-01 01:00:00.000000000 +0100
+++ src/libsigsegv-2.10/src/fault-cygwin-i386.h 2015-07-15 14:30:47.562341412 +0200
@@ -0,0 +1,33 @@
+/* Fault handler information. Cygwin/i386 and Cygwin/x86_64 version.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "fault-posix-ucontext.h"
+
+#if defined __x86_64__
+/* 64 bit registers */
+
+/* See winsup/cygwin/include/cygwin/signal.h */
+
+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.rsp
+
+#else
+/* 32 bit registers */
+
+/* See winsup/cygwin/include/cygwin/signal.h */
+
+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.esp
+
+#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150715/96a749ee/attachment.sig>
More information about the Cygwin
mailing list