forked from Imagelibrary/rtems
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:
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user