]> Savannah Git Hosting - gnulib.git/commitdiff
c-stack: Document another restriction.
authorBruno Haible <bruno@clisp.org>
Mon, 24 May 2021 10:32:25 +0000 (12:32 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 24 May 2021 10:32:25 +0000 (12:32 +0200)
Triggered by a discussion with Paul Eggert.

* lib/c-stack.h: Mention that ACTION should not use nested functions.

ChangeLog
lib/c-stack.h

index 5afb8811b94a230d65d10a184bacab0355222e3d..43056adcb6a0347956e7d240a63dc923fa188ec1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-05-24  Bruno Haible  <bruno@clisp.org>
+
+       c-stack: Document another restriction.
+       Triggered by a discussion with Paul Eggert.
+       * lib/c-stack.h: Mention that ACTION should not use nested functions.
+
 2021-05-22  Bruno Haible  <bruno@clisp.org>
 
        stdio: Fix compilation error on DragonFly BSD.
index 56d74f166233956295beb25b9de1db27c55e8449..a9a8b13f3947e56645ca65aa12f84c93266be839 100644 (file)
 
    A null ACTION acts like an action that does nothing.
 
-   ACTION must be async-signal-safe.  ACTION together with its callees
-   must not require more than 64 KiB of stack space.  Also,
-   ACTION should not call longjmp, because this implementation does
-   not guarantee that it is safe to return to the original stack.
+   Restrictions:
+   - ACTION must be async-signal-safe.
+   - ACTION together with its callees must not require more than 64 KiB of
+     stack space.
+   - ACTION must not create and then invoke nested functions
+     <https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html>, because
+     this implementation does not guarantee an executable stack.
+   - ACTION should not call longjmp, because this implementation does not
+     guarantee that it is safe to return to the original stack.
 
    This function may install a handler for the SIGSEGV signal or for the SIGBUS
    signal or exercise other system dependent exception handling APIs.  */