3 ms·
> tarsnap had a signal handler that was reading from a constant array. So what, how could this matter? The standard says thou shalt not. An references to the s
by Flowdalic 11y ago
> tarsnap had a signal handler that was reading from a constant array. So what, how could this matter? The standard says thou shalt not.
An references to the standard (I assume he is referring to POSIX) where this is disallowed?
- lokedhs 11y agoI believe this is in reference to the following quote: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03 http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2... The relevant quote is: the behavior is undefined if the signal handler refers to any object other than errno with static storage duration other than by assigning a value to an object declared as volatile sig_atomic_t, or if the signal handler calls any function defined in this standard other than one of the functions listed in the following table.