summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Clark <stephen.clark@oarcorp.com>2021-03-18 12:01:27 -0500
committerJoel Sherrill <joel@rtems.org>2021-05-05 09:45:56 -0500
commitcd5fd85730e5c6cacf169cd8a005e129c8ef1200 (patch)
tree540051b088b7fa0ef738c04da7d71bfc98fb5a69
parentca021433217a1b2ae357ba3ef9f6451082073b56 (diff)
downloadrtems-cd5fd85730e5c6cacf169cd8a005e129c8ef1200.tar.bz2
stackchk: Fixed 32bit pointers
Using 32bit types like uint32_t for pointers creates issues on 64 bit architectures like AArch64. Replaced occurrences of these with uintptr_t, which will work for both 32 and 64 bit architectures.
-rw-r--r--cpukit/libmisc/stackchk/check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index ab08155c92..a2b63345d9 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -447,12 +447,13 @@ static bool Stack_check_Dump_threads_usage(
{
char name[ 22 ];
const rtems_printer *printer;
+ uintptr_t sp = _CPU_Context_Get_SP( &the_thread->Registers );
printer = arg;
_Thread_Get_name( the_thread, name, sizeof( name ) );
Stack_check_Dump_stack_usage(
&the_thread->Start.Initial_stack,
- (void *) _CPU_Context_Get_SP( &the_thread->Registers ),
+ (void *) sp,
name,
the_thread->Object.id,
printer