This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
atexit bug?
- From: Ben Elliston <bje at wasabisystems dot com>
- To: newlib at sources dot redhat dot com
- Date: Fri, 5 Sep 2003 13:15:44 +1000
- Subject: atexit bug?
- Organisation: Wasabi Systems Inc.
In libc/stdlib/exit.c (_DEFUN), I see:
register struct _atexit *p;
register struct _on_exit_args * args;
register int n;
int i;
p = &_GLOBAL_REENT->_atexit;
I think this might have problems. When REENT_SMALL is defined,
_reent::_atexit (using C++ scoping notation) is a struct _atexit
member, whereas when it is not defined, it is a pointer to a struct
_atexit meaning that _GLOBAL_REENT->_atexit's type changes depending
on the state of REENT_SMALL.
Is my understanding correct?
Ben