From cbd871ad41f819cb6c0667a2886d6438ead47c61 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 19 Aug 2013 09:03:42 +0000 Subject: [PATCH] * libc/stdlib/__atexit.c (__register_exitproc): NULL-ify _on_exit_args_ptr when creating a new _atexit structure while _REENT_SMALL is defined. --- newlib/ChangeLog | 6 ++++++ newlib/libc/stdlib/__atexit.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a244668fe..25d30d08c 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2013-08-19 Meador Inge + + * libc/stdlib/__atexit.c (__register_exitproc): NULL-ify + _on_exit_args_ptr when creating a new _atexit structure while + _REENT_SMALL is defined. + 2013-08-12 Bin Cheng * libc/configure.in (--enable-newlib-wchar-orient): Remove. diff --git a/newlib/libc/stdlib/__atexit.c b/newlib/libc/stdlib/__atexit.c index d36a1a4e5..18edc8c91 100644 --- a/newlib/libc/stdlib/__atexit.c +++ b/newlib/libc/stdlib/__atexit.c @@ -104,6 +104,8 @@ _DEFUN (__register_exitproc, #ifndef _REENT_SMALL p->_on_exit_args._fntypes = 0; p->_on_exit_args._is_cxa = 0; +#else + p->_on_exit_args_ptr = NULL; #endif #endif }