mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
stdlib: assert on NULL function pointer in atexit etc. [BZ #20544]
This commit is contained in:
@@ -36,6 +36,10 @@ __internal_atexit (void (*func) (void *), void *arg, void *d,
|
||||
{
|
||||
struct exit_function *new;
|
||||
|
||||
/* As a QoI issue we detect NULL early with an assertion instead
|
||||
of a SIGSEGV at program exit when the handler is run (bug 20544). */
|
||||
assert (func != NULL);
|
||||
|
||||
__libc_lock_lock (__exit_funcs_lock);
|
||||
new = __new_exitfn (listp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user