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: "jreiser at BitWagon dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 01 Sep 2016 00:38:24 +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
John Reiser <jreiser at BitWagon dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|RFE: detect NULL function |RFE: atexit, __cxa_atexit,
|argumen atexit, |on_exit detect NULL
|__cxa_atexit, on_exit |function pointer argument
--- Comment #1 from John Reiser <jreiser at BitWagon dot com> ---
Request For Enhancement(RFE): Please detect a NULL function pointer argument to
functions atexit(), __cxa_atexit(), on_exit(). Such an argument will cause
SIGSEGV when the exit function attempts to call the function as the program
exits. This is an error by the caller of atexit or __cxa_atexit or on_exit.
It would be nice to detect the error as early as possible.
The suggested action upon detecting a NULL function pointer is to not enqueue
the NULL pointer, then return an error value (typically -1) from atexit,
__cxa_atexit, or on_exit.
--
You are receiving this mail because:
You are on the CC list for the bug.