This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20544] RFE: atexit, __cxa_atexit, on_exit detect NULL function pointer argument
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 01 Sep 2016 11:59:31 +0000
- Subject: [Bug libc/20544] RFE: atexit, __cxa_atexit, on_exit detect NULL function pointer argument
- Auto-submitted: auto-generated
- References: <bug-20544-131@http.sourceware.org/bugzilla/>
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.