Changeset b539af8 in rtems


Ignore:
Timestamp:
01/26/22 22:00:04 (5 months ago)
Author:
Kinsey Moore <kinsey.moore@…>
Branches:
master
Children:
b519e50
Parents:
2145e0c7
git-author:
Kinsey Moore <kinsey.moore@…> (01/26/22 22:00:04)
git-committer:
Joel Sherrill <joel@…> (01/27/22 19:07:30)
Message:

cpukit: Prevent error with disabled stack checker

When the stack checker is not enabled, the stack checker reporting
function can still be called. This prevents that call from performing a
null memory access in trying to find the high water mark if the stack
checker was never initialized.

This also introduces a test to ensure this call does not cause a crash.

Closes #4588

Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/stackchk/check.c

    r2145e0c7 rb539af8  
    411411  void     *high_water_mark;
    412412
     413  /* This is likely to occur if the stack checker is not actually enabled */
     414  if ( stack->area == NULL ) {
     415    return false;
     416  }
     417
    413418  low  = Stack_check_Usable_stack_start(stack);
    414419  size = Stack_check_Usable_stack_size(stack);
  • spec/build/testsuites/libtests/grp.yml

    r2145e0c7 rb539af8  
    249249  uid: stackchk01
    250250- role: build-dependency
     251  uid: stackchk02
     252- role: build-dependency
    251253  uid: stat
    252254- role: build-dependency
Note: See TracChangeset for help on using the changeset viewer.