Does rtems_stack_checker_is_blown() really return TRUE ?
rolf.schroedter at dlr.de
Wed Jul 7 06:51:05 UTC 2010
I'm using sparc-rtems 4.9 for the Leon3 core from Gaisler.
Playing with the stack checker I noticed that
rtems_stack_checker_is_blown() seems to never return TRUE.
Looking into the 4.9.4 sources, I guess that the
rtems_fatal_error_occurred( 0x81 ) call in
Stack_check_report_blown_task() is responsive for this behavior.
Is this the desired behavior, or is this a bug ?
My intention with rtems_stack_checker_is_blown() returning TRUE on error
is, that the application could try to print out the error location
before raising a fatal error.
BTW, the documentation is contradictory about the TRUE/FALSE return value:
IMO this is correct:
25.3.2 Checking for Blown Task Stack
The application may check whether the stack pointer of currently
executing task is within
proper bounds at any time by calling the rtems_stack_checker_is_blown
method return FALSE if the task is operating within its stack bounds and
has not damaged
its pattern area.
But this is wrong:
25.4.1 STACK CHECKER IS BLOWN - Has Current Task Blown Its Stack
bool rtems_stack_checker_is_blown( void );
TRUE - Stack is operating within its stack limits
FALSE - Current stack pointer is outside allocated area
Should I file a bug report ?
German Aerospace Center
Institute of Planetary Research
D-12489 Berlin, Rutherfordstrasse 2
Tel/Fax: (+49) (30) 67055-416/384
Email: Rolf.Schroedter at dlr.de
More information about the users