[rtems commit] New fstest to cover RFS bitmaps - fsrfsbitmap01

Joel Sherrill joel.sherrill at OARcorp.com
Tue Oct 16 16:43:39 UTC 2012


On 10/15/2012 10:34 AM, Krzysztof Mięsowicz wrote:
> Hi,
>
>
>     What is the purpose of this test?  It accesses illegal memory on
>     some targets (e.g. NULL pointer access).
>
> The purpose of this test is to cause fail on loading bitmap in 
> invoking functions and to execute ranges which can execute only when 
> bitmap load fails. rtems_rfs_bitmap_load_map can fail only when 
> control->buffer is null or when buffer request fail. This test is part 
> of my ESA SOCIS project on improving RTEMS coverage.
>
Chris will need to be final ruler on this but if the code is written to
assume that it is always passed a valid pointer, then you have to
honor this in the testing.  You can add a debug-enabled consistency
check that the control pointer is NULL. But you shouldn't pass it in
if it is not checked in a production build.

The question is.. is this code comparable to the score core
which is only invoked by trusted layers? If so, it doesn't need to
check for NULL and you shouldn't pass in a "control = NULL"

Running on mips/jmr3904 is the easiest way to find the
NULL dereferences which are by accident.
> Krzysztof Miesowicz
>


-- 
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 35806
Support Available               (256) 722-9985

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20121016/1406fa3d/attachment-0001.html>


More information about the devel mailing list