summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 07:30:44 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 07:49:42 +0200
commita75a7d3c577528497ce64777b572c1f60574a67c (patch)
treedde9773138472328a9d8a9883917766654356974
parent56e61e24bd8cada5b25f6d4fdf433eed84f25204 (diff)
downloadrtems-a75a7d3c577528497ce64777b572c1f60574a67c.tar.bz2
stackchk: Remove heap hack
It is now guranteed that threads do not use a freed stack during termination.
-rw-r--r--cpukit/libmisc/stackchk/check.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index bc4a7fc478..a3b7190ca3 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -113,14 +113,8 @@ static inline bool Stack_check_Frame_pointer_in_range(
((_the_stack)->area)
#else
- /*
- * We need this magic offset because during a task delete the task stack will
- * be freed before we enter the task switch extension which checks the stack.
- * The task stack free operation will write the next and previous pointers
- * for the free list into this area.
- */
#define Stack_check_Get_pattern( _the_stack ) \
- ((char *)(_the_stack)->area + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE)
+ ((char *)(_the_stack)->area)
#define Stack_check_Calculate_used( _low, _size, _high_water) \
( ((char *)(_low) + (_size)) - (char *)(_high_water) )