From 0d85b41a2d57f1da6380d20bd8fa3795492586da Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Sun, 4 Sep 2005 07:38:51 +0000 Subject: [PATCH] - Following detection of a stack overflow, the startup code eventually called _exit(). It should have called exit() instead. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15028 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/changes | 4 ++++ library/stdlib_main.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/library/changes b/library/changes index 8111ab4..c0b5a1f 100644 --- a/library/changes +++ b/library/changes @@ -1,3 +1,7 @@ +- Following detection of a stack overflow, the startup code eventually + called _exit(). It should have called exit() instead. + + c.lib 1.195 (3.9.2005) - In __time_delay() the CheckIO() test was wrong and should have diff --git a/library/stdlib_main.c b/library/stdlib_main.c index 9d3ac88..747396e 100644 --- a/library/stdlib_main.c +++ b/library/stdlib_main.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_main.c,v 1.25 2005-07-03 10:36:47 obarthel Exp $ + * $Id: stdlib_main.c,v 1.26 2005-09-04 07:38:51 obarthel Exp $ * * :ts=4 * @@ -136,9 +136,9 @@ call_main(void) /* If we end up here with the __stack_overflow variable set then the stack overflow handler dropped into - longjmp() and _exit() did not get called. This + longjmp() and exit() did not get called. This means that we will have to show the error message - and invoke _exit() all on our own. */ + and invoke exit() all on our own. */ if(__stack_overflow) { SHOWMSG("we have a stack overflow"); @@ -149,7 +149,7 @@ call_main(void) __show_error("Stack overflow detected"); if(setjmp(__exit_jmp_buf) == 0) - _exit(RETURN_FAIL); + exit(RETURN_FAIL); } /* If necessary, print stack size usage information. */