On Tue, Nov 05, 2002 at 11:45:06AM -0500, Warren Postma wrote:
I'm getting an interesting bit of output when I run stress_threads.exe
This is the test code in stress_threads.c (circa line 600)
where perform_stressful_tasks() is cleaning up:
...
/* now free it all up */
for (i = 0; i < MAX_MALLOCED_SPACES; ++i) {
if (spaces[i] != NULL) {
size = sizes[i];
for (j = 0; j < size; ++j) {
// Validate chunk data.
if ((0x50 | ((j+i) & 0x0f)) != spaces[i][j]) {
printf("Bad byte in chunk\n");
}
spaces[i][j] = 0xAA; /* write a bit pattern */
}
free(spaces[i]);
} else {
++statistics.malloc_failures;
}
}
...
In this case, I'm getting that "Bad byte in chunk" output to screen when I
run stress_threads? Is this likely to be a bug in my ECOS kernel or toolset?
Has anyone else seen this while running this test? I'm going to switch to a
different bunch of tests and see what other problems I can find on my
target. I picked stress_threads as I thought, if the more brutal tests
pass, then its likely ECOS is stable on my target. <grin>
It could be that the heap memory that malloc thinks it can use (from your
memory layout spec) doesn't match reality. You can also try the heaptest
test from the memalloc package.