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.
The relevant quote is: