diff options
author | Bruno Haible <bruno@clisp.org> | 2021-05-24 12:32:25 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-05-24 12:32:25 +0200 |
commit | 8f7615ad790cb837e1888dc4064c6540ecb1f72d (patch) | |
tree | f7c15326a513cc6871cb791b8e05551151209b0a /lib/c-stack.h | |
parent | af26171aa63d61a49c05b5582b40f92f4f97ed63 (diff) | |
download | gnulib-8f7615ad790cb837e1888dc4064c6540ecb1f72d.tar.gz |
c-stack: Document another restriction.
Triggered by a discussion with Paul Eggert.
* lib/c-stack.h: Mention that ACTION should not use nested functions.
Diffstat (limited to 'lib/c-stack.h')
-rw-r--r-- | lib/c-stack.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/c-stack.h b/lib/c-stack.h index 56d74f1662..a9a8b13f39 100644 --- a/lib/c-stack.h +++ b/lib/c-stack.h @@ -33,10 +33,15 @@ 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. */ |