diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-18 18:46:21 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-18 18:46:21 +0000 |
commit | 3a121776450c5ba37637119d48094d59f2e2d5c2 (patch) | |
tree | f754847b2ff2d09e6b822589114532eb14f2923d /testsuites/sptests/sp63/init.c | |
parent | 2009-08-18 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-3a121776450c5ba37637119d48094d59f2e2d5c2.tar.bz2 |
2009-08-18 Joel Sherrill <joel.sherrill@OARcorp.com>
* sp63/init.c, sp63/sp63.scn: Add case for math on size requested
overflowing on _Heap_Allocate_aligned.
Diffstat (limited to 'testsuites/sptests/sp63/init.c')
-rw-r--r-- | testsuites/sptests/sp63/init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuites/sptests/sp63/init.c b/testsuites/sptests/sp63/init.c index 4d4c63f73d..ee551d817a 100644 --- a/testsuites/sptests/sp63/init.c +++ b/testsuites/sptests/sp63/init.c @@ -31,6 +31,10 @@ void test_case_one(void) heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 ); printf( "Init - Heap size=%d\n", heap_size ); + puts( "Init - _Heap_Allocate - too large size (overflow)- not OK"); + ptr1 = _Heap_Allocate( &Heap, 0xffffffff ); + assert( !ptr1 ); + puts( "Init - _Heap_Allocate_aligned - OK"); ptr1 = _Heap_Allocate_aligned( &Heap, 64, 32 ); assert( ptr1 ); |