[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch-1_4 debian bug 154053 - ENOSYS in sigstack
From: |
Eric Blake |
Subject: |
branch-1_4 debian bug 154053 - ENOSYS in sigstack |
Date: |
Thu, 03 Aug 2006 06:21:15 -0600 |
User-agent: |
Thunderbird 1.5.0.5 (Windows/20060719) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=154053;archive=yes (and
also CVS head's TODO) reports:
> m4: sigstack: Function not implemented
>
> I did a little searching around on the web (looked for "sigstack not
> found" with Google) and found some interesting discussions about M4
> generating this kind of error when built with 2.2 header files and used
> on 2.0.x kernels (sigstack does not exist in 2.0 kernels, and M4 instead
> of paying attention to ENOSYS returned by the call and trying to do
> something else, just fails).
Seeing as how 2.0 kernels are rare these days, this is probably too
little, too late. However, I agree that ENOSYS is different from other
errors, and that m4 should just gracefully continue without stack overflow
detection (as it does when sigstack is not found during configuration). I
don't know if it warrants a NEWS entry.
2006-08-03 Eric Blake <address@hidden>
* src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
overflow detection when sigstack exists but is not implemented.
Fixes debian bug 154053.
* THANKS: Updated.
Reported by David Perlin.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE0eo684KuGfSFAYARAuVMAKCsBANyQ7lhZ6pJWrtgmpXQaEaW6ACglwJj
kmX1qvBnA3lBoQjwDvGhwqo=
=EW7P
-----END PGP SIGNATURE-----
Index: src/stackovf.c
===================================================================
RCS file: /sources/m4/m4/src/stackovf.c,v
retrieving revision 1.1.1.1.2.4
diff -u -p -r1.1.1.1.2.4 stackovf.c
--- src/stackovf.c 28 Jul 2006 20:39:37 -0000 1.1.1.1.2.4
+++ src/stackovf.c 3 Aug 2006 12:18:08 -0000
@@ -346,7 +346,16 @@ Error - Do not know how to set up stack-
ss.ss_sp = xmalloc ((unsigned) ss.ss_size);
ss.ss_flags = 0;
if (sigaltstack (&ss, NULL) < 0)
- error (EXIT_FAILURE, errno, "sigaltstack");
+ {
+ /* Oops - sigaltstack exists but doesn't work. We can't
+ install the overflow detector, but should gracefully treat
+ it as though sigaltstack doesn't exist. For example, this
+ happens when compiled with Linux 2.1 headers but run
+ against Linux 2.0 kernel. */
+ if (errno == ENOSYS)
+ return;
+ error (EXIT_FAILURE, errno, "sigaltstack");
+ }
}
#elif HAVE_SIGSTACK
@@ -358,7 +367,16 @@ Error - Do not know how to set up stack-
ss.ss_sp = stackbuf + SIGSTKSZ;
ss.ss_onstack = 0;
if (sigstack (&ss, NULL) < 0)
- error (EXIT_FAILURE, errno, "sigstack");
+ {
+ /* Oops - sigstack exists but doesn't work. We can't install
+ the overflow detector, but should gracefully treat it as
+ though sigstack doesn't exist. For example, this happens
+ when compiled with Linux 2.1 headers but run against Linux
+ 2.0 kernel. */
+ if (errno == ENOSYS)
+ return;
+ error (EXIT_FAILURE, errno, "sigstack");
+ }
}
#else /* not HAVE_SIGSTACK */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch-1_4 debian bug 154053 - ENOSYS in sigstack,
Eric Blake <=