Possible problem with stackcheck function? SS-20021007

Bob Wisdom bobwis at ascweb.co.uk
Mon Oct 28 19:50:21 UTC 2002


Hi all,

The Background: I am building for gen68360 BSP using ss-20021007. I think I
am
having resource allocation problems with RTEMS, - I get infrequent
unexplained bus errors / crashes, and am therefore trying to exactly
determine the runtime resource utilisation as a first check.

The Problem: Trying to find the cause, I switched on the Stack-Dump build
option
and found that its printout failed with an bus error, thinking of course
this was my resource problem showing itself, I was surprised to find that
there seems to be a bug in the code in the function
Stack_check_Dump_threads_usage in the file check.c in the libmisc/stackcheck
directory:

u32_name = *(unsigned32 *)the_thread->Object.name;  <-- the extra
indirection seems the cause.

u32_name = (unsigned32 *)the_thread->Object.name;  <-- this seems to work ok

(...well mostly, the first line seems to still get a bad task name, it
doesn't crash the system though :-)).

I can not be certain of course if I have done something stupid in building
my task names and tables, so it would be good if someone could check to see
if the stackdump problem is really there, or if its me being stupid.
Incidentally there seems to be a lot of work-in-progress in this file.

I also still get a bus-error crash if I use the "task" command in the RTEMS
monitor program, is this related maybe?

One final question, is there a runtime function available to use which can
display all the memory resources known to the kernel so I can easily
validate my configuration, heaps, stacks, tasks etc?

Regards to all RTEMS users.
Bob Wisdom (U.K.)




More information about the users mailing list