bug-gnulib
[Top][All Lists]
Advanced

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

Re: c-stack vs. older platforms


From: Bruno Haible
Subject: Re: c-stack vs. older platforms
Date: Thu, 5 Jun 2008 22:53:23 +0200
User-agent: KMail/1.5.4

Eric Blake wrote:
> I'm wondering whether there are any current porting 
> targets where m4's attempts to use the fallbacks of sigstack in place of 
> missing sigaltstack, and/or sigvec/SV_ONSTACK in place of missing 
> sigaction/SA_ONSTACK, are worth porting into the c-stack module.  Or put 
> another way, are there any platforms where switching to c-stack would cause a 
> regression in m4's stack detection abilities if we don't port m4's fallbacks 
> for supporting older APIs?
> 
> [1]http://git.savannah.gnu.org/gitweb/?p=m4.git;a=blob;f=src/stackovf.c

Looking at m4's current code requirements:

  - sigvec/SV_ONSTACK is pointless; it was last needed on SunOS4. The only
    platform nowadays without sigaction is mingw.

  - sigaltstack is present and works on
      Linux, FreeBSD, NetBSD, AIX, HP-UX 11.11, IRIX, OSF/1, Solaris, and
      (more or less) MacOS X.
    It is not available on
      OpenBSD, HP-UX 11.23, Cygwin, mingw, BeOS.

  - But the most constraining requirement is how to get the fault address:
      - 'ip->si_addr' works only on
          Linux >= 2.4, HP-UX, OSF/1, Solaris.
        (The same code would also work on FreeBSD, NetBSD, OpenBSD if you
        were catching SIGBUS in addition to SIGSEGV.)
      - The "struct sigcontext *scp, char *addr" code is useless, it never
        works. (It would work on FreeBSD if you were catching SIGBUS, not
        only SIGSEGV.)

So m4's current code (approximately) only works on Linux >= 2.4, HP-UX, OSF/1,
Solaris. And these are the same platforms on which 'c-stack' works, I believe.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]