[rtems commit] tmtests/tm26: Avoid NULL pointer access

Sebastian Huber sebastian.huber at embedded-brains.de
Fri May 29 15:45:27 UTC 2015


----- Joel Sherrill <joel.sherrill at oarcorp.com> schrieb:
> 
> 
> On 5/29/2015 8:37 AM, Sebastian Huber wrote:
> > Module:    rtems
> > Branch:    master
> > Commit:    5611839a7e2e371dd1f327c336c785095f634e55
> > Changeset: http://git.rtems.org/rtems/commit/?id=5611839a7e2e371dd1f327c336c785095f634e55
> >
> > Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
> > Date:      Fri May 29 14:18:32 2015 +0200
> >
> > tmtests/tm26: Avoid NULL pointer access
> >
> > ---
> >
> >   testsuites/tmtests/tm26/task1.c | 3 ---
> >   1 file changed, 3 deletions(-)
> >
> > diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
> > index 6cec7da..ee66218 100644
> > --- a/testsuites/tmtests/tm26/task1.c
> > +++ b/testsuites/tmtests/tm26/task1.c
> > @@ -439,9 +439,6 @@ rtems_task Low_task(
> >     thread_disable_dispatch();
> >
> >     benchmark_timer_initialize();
> > -#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
> > -    _Context_Restore_fp( &_Thread_Get_executing()->fp_context );
> > -#endif
> 
> What impact does this have on the case being timed?
> 
> How did this fault? What configuration?

Sorry, I didn't fault.  I was stupid enough to look at "executing->fp_context" in the GDB.  I will revert this patch.

The main problem is that this test restores an FP context without the FPU enabled.  I have to figure out how we can avoid this.

> 
> >       _Context_Switch(
> >         &executing->Registers,
> >         &_Thread_Get_executing()->Registers
> >
> > _______________________________________________
> > vc mailing list
> > vc at rtems.org
> > http://lists.rtems.org/mailman/listinfo/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
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list