Mail Archives: cygwin/2015/07/15/08:44:27
--MiFvc8Vo6wRSORdP
Content-Type: multipart/mixed; boundary="MZf7D3rAEoQgPanC"
Content-Disposition: inline
--MZf7D3rAEoQgPanC
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Jul 15 09:51, Corinna Vinschen wrote:
> Hi guys,
>=20
> 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
>=20
> 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
>=20
> mingw* | cygwin*) sv_cv_have_stack_overflow_recovery=3Dyes ;;
>=20
> which is the right thing to do, but that means CFG_LEAVE has been
> set to leave-none.c, apparently.
>=20
> 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
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--MZf7D3rAEoQgPanC
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="libsigsegv.cygport"
Content-Transfer-Encoding: quoted-printable
NAME=3D"libsigsegv"
VERSION=3D"2.10"
RELEASE=3D2
CATEGORY=3DLibs
SUMMARY=3D"Handling page faults in user mode"
DESCRIPTION=3D"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=3D"http://libsigsegv.sourceforge.net/"
# SRC_URI=3D"ftp://www.gnu.ftp.uni-erlangen.de/pub/gnu/${PN}/${PN}-${PV}.ta=
r.gz"
# SRC_URI=3D"http://puzzle.dl.sourceforge.net/sourceforge/${PN}/${PN}-${PV}=
.tar.bz2"
# SRC_URI=3D"ftp://ftp.gnu.org/pub/gnu/${PN}/${PN}-${PV}.tar.gz"
SRC_URI=3D"http://ftpmirror.gnu.org/${PN}/${PN}-${PV}.tar.gz"
DLLREV=3D2
MAKEOPTS=3D"-j1"
CYGCONF_ARGS=3D"--enable-shared"=20
PKG_NAMES=3D"${PN} ${PN}${DLLREV}"
PKG_CONTENTS[0]=3D"--exclude=3Dusr/bin/cygsigsegv-${DLLREV}.dll usr"
PKG_CONTENTS[1]=3D"usr/bin/cygsigsegv-${DLLREV}.dll"
--MZf7D3rAEoQgPanC
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="libsigsegv-2.10-2.src.patch"
Content-Transfer-Encoding: quoted-printable
--- 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=3Dfault-cygwin-i386.h
+ ;;
*)
CFG_FAULT=3Dfault-posix-ucontext.h
;;
@@ -522,16 +525,6 @@ case "$host_os" in
FAULT_CONTEXT_INCLUDE=3D'#include <windows.h>'
CFG_FAULT=3Dfault-win32.h # nonexistent, just a dummy
;;
- cygwin*)
- FAULT_CONTEXT=3D'CONTEXT'
- FAULT_CONTEXT_INCLUDE=3D'#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=3Dfault-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=3Dyes
@@ -858,7 +851,7 @@ AC_CACHE_CHECK([if the system supports c
sv_cv_have_stack_overflow_recovery=3Dyes
else
case "$host_os" in
- mingw* | cygwin*) sv_cv_have_stack_overflow_recovery=3Dyes ;;
+ mingw*) sv_cv_have_stack_overflow_recovery=3Dyes ;;
*)
if test "$CFG_LEAVE" !=3D 'leave-none.c'; then
if test "$sv_cv_sigaltstack" !=3D no; then
@@ -927,7 +920,7 @@ dnl Requires AC_CANONICAL_HOST, CFG_HAND
dnl HAVE_SIGSEGV_RECOVERY, HAVE_STACK_OVERFLOW_RECOVERY.
=20
case "$host_os" in
- mingw* | cygwin*) CFG_HANDLER=3Dhandler-win32.c ;;
+ mingw*) CFG_HANDLER=3Dhandler-win32.c ;;
*)
if test -z "$CFG_HANDLER"; then
if test $sv_cv_have_sigsegv_recovery =3D no \
--- origsrc/libsigsegv-2.10/src/fault-cygwin-i386.h 1970-01-01 01:00:00.000=
000000 +0100
+++ src/libsigsegv-2.10/src/fault-cygwin-i386.h 2015-07-15 14:30:47.5623414=
12 +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
--MZf7D3rAEoQgPanC--
--MiFvc8Vo6wRSORdP
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJVplWUAAoJEPU2Bp2uRE+gCjUP/2ewtAELCnaVfUIW4xWbQqb5
Vyw6qZbWVZ7WoCFMSAn0APQL5dCVCK5Q+B+9Pa4f5bDFbqYfeJHssHNJ/P4cmQHw
dZ6sw+aEObtKLn4O8Cqol0L/g+3v4v0LlFjHoKkdHIDYUsbXD0bpe4mGmE7CwOnB
XwdliNX8hLUCLCmKb7gqXplXt9D1EuVS+OUra9cDfCNoSrCSDwoH89mbXCNXgYOo
5T2z2GW+q3hyrfqAWhH+ny9+acLymUHdL7q/aynyV9tW1YVs5iFxpDudz6S2f3w0
xYNEMe0A+2jVEuD/zifKSv6RhbWrQQjTMOwqSsXSsqtjDUmKX9mH8DOMqZTg/933
+o+LQdE1ao2wvKM+3aGIEgRWHWKEpS35RiYKB0/HCSUeFP76aaoB+mNEhAELTtv9
ZwtIPRfAyw6tTGBDqO8wCwlT+BCWG/7u1gX9eOV3vljuCpqSAbKUwKyzD2TGoItu
cQijQb8QffxB9vH/ePLcPPLGkoxZlv8KVVgwZhJdrnl2dEC2yDVZRVBH31ITr5Q+
e2vtCPUvhBMR37+oMqlKW8TcjrPV8DE5M5PKSKarxjLx4Ej8kyF/r8YqBjCdfiEB
QUQbFvlFOfWKBTfS3cz0fMczYWElf+Gxs1OgSXiMcFcS5GDoKQLJYPPhZrcpm/SM
HA1dLDE+K/V9aOBcqkYx
=6Sk2
-----END PGP SIGNATURE-----
--MiFvc8Vo6wRSORdP--
- Raw text -