2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com>

* malloctest/init.c: Added test to check failure branch on calloc.
This commit is contained in:
Jennifer Averett
2010-06-22 18:09:04 +00:00
parent 34c062f065
commit 81110848dc
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* malloctest/init.c: Added test to check failure branch on calloc.
2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* malloc02/init.c, malloc02/malloc02.doc: Enable malloc dirty helper.

View File

@@ -1076,6 +1076,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
void *p1;
rtems_time_of_day time;
rtems_status_code status;
@@ -1085,6 +1086,12 @@ rtems_task Init(
status = rtems_clock_set( &time );
directive_failed( status, "rtems_clock_set" );
p1 = calloc( 1, SIZE_MAX );
if (p1) {
printf("ERROR on attempt to calloc SIZE_MAX block expected failure.");
free( p1 );
}
test_heap_initialize();
test_heap_block_allocate();
test_heap_allocate();