<html>
<head>
<meta content="text/html; charset=ISO-8859-2"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 10/15/2012 10:34 AM, Krzysztof Mięsowicz wrote:
<blockquote
cite="mid:CANNpagra9keTCw7cAjVbbnk8ZznN7DvKg-YvWeAoPNA5pNmnNw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-2">
Hi,
<div><br>
<div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What is the purpose of this test? It accesses illegal
memory on some targets (e.g. NULL pointer access).<br>
<br>
</blockquote>
<div>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.</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
Chris will need to be final ruler on this but if the code is written
to <br>
assume that it is always passed a valid pointer, then you have to<br>
honor this in the testing. You can add a debug-enabled consistency<br>
check that the control pointer is NULL. But you shouldn't pass it in<br>
if it is not checked in a production build.<br>
<br>
The question is.. is this code comparable to the score core<br>
which is only invoked by trusted layers? If so, it doesn't need to<br>
check for NULL and you shouldn't pass in a "control = NULL"<br>
<br>
Running on mips/jmr3904 is the easiest way to find the<br>
NULL dereferences which are by accident.<br>
<blockquote
cite="mid:CANNpagra9keTCw7cAjVbbnk8ZznN7DvKg-YvWeAoPNA5pNmnNw@mail.gmail.com"
type="cite">
<div>
<div>
<div class="gmail_quote">
<div>Krzysztof Miesowicz</div>
</div>
<br>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research& Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35806
Support Available (256) 722-9985</pre>
</body>
</html>