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 | |
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')
-rw-r--r-- | testsuites/sptests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/sptests/sp63/init.c | 4 | ||||
-rw-r--r-- | testsuites/sptests/sp63/sp63.scn | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 79db688ce5..cd970e6ddc 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,10 @@ 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. + +2009-08-18 Joel Sherrill <joel.sherrill@OARcorp.com> + * spobjgetnext/init.c, spobjgetnext/spobjgetnext.scn: Add error cases for various null parameters. 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 ); diff --git a/testsuites/sptests/sp63/sp63.scn b/testsuites/sptests/sp63/sp63.scn index 592572492e..8f603a6867 100644 --- a/testsuites/sptests/sp63/sp63.scn +++ b/testsuites/sptests/sp63/sp63.scn @@ -1,11 +1,13 @@ *** TEST 63 *** Init - _Heap_Initialize (for test one) - OK -Init - Heap size=1012 +Init - Heap size=1000 +Init - _Heap_Allocate - too large size (overflow)- not OK Init - _Heap_Allocate_aligned - OK Init - _Heap_Resize_block - OK Init - _Heap_Initialize (for test two) - OK -Init - Heap size=1012 +Init - Heap size=1000 Init - _Heap_Allocate_aligned - OK Init - _Heap_Resize_block - OK +Init - _Heap_Allocate_aligned - request impossible - not OK *** END OF TEST 63 *** |