bug-gnulib
[Top][All Lists]
Advanced

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

c-stack: Catching stack overflow on most platforms without libsigsegv


From: Bruno Haible
Subject: c-stack: Catching stack overflow on most platforms without libsigsegv
Date: Mon, 17 May 2021 03:49:50 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-206-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

Here is a proposed patch to make use of the new 'sigsegv' module
(quasi a mini libsigsegv without library dependencies), so that

  * On most systems, catching stack overflow becomes possible without
    link dependencies. (The only notable exceptions, where GNU libsigsegv
    are still needed, are native Windows and older versions of various
    OSes: Mac OS X 10.5, probably NetBSD 7, and such.)

  * In particular, glibc systems are no longer left behind, compared to
    Solaris.

I have verified this patch by building and m4 snapshot with it on
  - glibc
  - newest glibc > 2.33 snapshot
  - Solaris 11/sparc64
  - Cygwin
  - Minix (just to test a case where catching stack overflow is not supported).

And I had tested the 'sigsegv' module on ca. 58 platforms, from IRIX 6.5 to
musl libc on Linux/s390x.

Bruno

Attachment: 0001-c-stack-Catching-stack-overflow-on-most-platforms-wi.patch
Description: Text Data


reply via email to

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