malloc04 was Re: change log for rtems (2011-07-01)

Joel Sherrill joel.sherrill at OARcorp.com
Mon Jul 4 15:57:15 UTC 2011


Hi,

I duplicated the failure.

malloc04 is an odd test.  It is supposed to exercise all non-fatal
error paths in the malloc family sbrk() support.  The attached patch
disables some of the test cases.  Since the code was very careful
to produce specific paths,  I need to run coverage reports
and see what isn't covered now.

On 07/03/2011 12:49 PM, Sebastian Huber wrote:
> On 01/07/11 21:11, rtems-vc at rtems.org wrote:
>> diff -u rtems/cpukit/libcsupport/src/malloc_initialize.c:1.14 rtems/cpukit/libcsupport/src/malloc_initialize.c:1.15
>> --- rtems/cpukit/libcsupport/src/malloc_initialize.c:1.14	Wed Aug 25 09:30:01 2010
>> +++ rtems/cpukit/libcsupport/src/malloc_initialize.c	Fri Jul  1 13:23:09 2011
>> @@ -45,7 +45,7 @@
>>    {
>>      /*
>>       *  If configured, initialize the statistics support
>> -  */
>> +   */
>>      if ( rtems_malloc_statistics_helpers != NULL ) {
>>        (*rtems_malloc_statistics_helpers->initialize)();
>>      }
>> @@ -59,11 +59,13 @@
>>       *  Initialize the optional sbrk support for extending the heap
>>       */
>>      if ( rtems_malloc_sbrk_helpers != NULL ) {
>> -    heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
>> +    void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
>>          heap_begin,
>>          sbrk_amount
>>        );
>> -    heap_size  = (uintptr_t) sbrk_amount;
>> +
>> +    heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
>> +    heap_begin = new_heap_begin;
> With this change libtests/malloc04 fails.
> _______________________________________________
> rtems-vc mailing list
> rtems-vc at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-vc


-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: malloc04.diff
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110704/8d735139/attachment.ksh>


More information about the vc mailing list