This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/20544] RFE: atexit, __cxa_atexit, on_exit detect NULL function pointer argument


https://sourceware.org/bugzilla/show_bug.cgi?id=20544

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
-fsanitize=undefined (or -fsanitize=nonnull-attribute
-fsanitize-undefined-trap-on-error) already catches this for atext and on_exit.
 Applications should never call __cxa_atexit directly, so the issue does not
really apply there.

If that is not good enough for your purposes, please tell us more about the
developer errors you want to guard against.

I would expect that anyone who manages to pass a NULL pointer to atexit (which
does not look like a common mistake) would also fail to check the return value
from atexit, so we'd really have to abort the process.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]