Experimental Physics and Industrial Control System
To play devil's advocate........
Does anyone know what happens in VxWorks
if the C++ "new" operator throws an unhandled exception
if there is insufficient heap space?
*If* it suspends the task, then taskwd will work
in an intuitive fashion. *If*, however, the task exits,
then (it sounds like) it will escape the notice of taskwd.
In the latter case, or in any case where a library
function might call "exit()", then taskwd ought to check for
a missing task and treat it the same as a suspended task.
Alternatively, all code under taskwd supervision
must handle all exceptions, and never use library functions
which might call "exit" (a fairly tall order).
As Kay says, if a monitored task *decides* to exit,
it should intentionally unregister itself. Under those rules,
there seems little harm in taskwd checking for missing tasks
as well as suspended tasks (as Dave T. suggested).
-- Larry
P.S. I now know the answer to my hypothetical, at least for
the SNS VxWorks kernel. The task is suspended (so taskwd works
properly). Try this code to see what happens in your O/S:
#include <ostream.h> // cout
extern "C" void newTest(void){
// ask for too much memory
char *tooBig = new char[(1<<24)];
// do we get here?
cout << "Value of tooBig is: " << (unsigned long) tooBig << endl;
}
- Replies:
- RE: Possible bug in taskwd Jeff Hill
- References:
- Re: Possible bug in taskwd Kay-Uwe Kasemir
- Navigate by Date:
- Prev:
Re: Possible bug in taskwd Kay-Uwe Kasemir
- Next:
RE: Possible bug in taskwd Jeff Hill
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Possible bug in taskwd Kay-Uwe Kasemir
- Next:
RE: Possible bug in taskwd Jeff Hill
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024