Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#1400 closed defect (fixed)

Floating point context management flaw

Reported by: Sebastian Huber Owned by: Joel Sherrill
Priority: normal Milestone: 4.10.3
Component: score Version: 4.10
Severity: normal Keywords:
Cc: chrisj@…, plattro@…, gedare@… Blocked By:
Blocking:

Description

There is a flaw in the floating point (FP) context management. The FP context is allocated from the workspace during thread creation and released during thread deletion. The pointer to the allocated memory is stored in TCB.Start.fp_context. The actual FP context used for save and restore is available via TCB.fp_context. A special feature _Context_Fp_start() allows to modify the FP context pointer during thread creation. Unfortunately this affects also TCB.Start.fp_context which is used to allocate and release the FP context area. This may lead to a workspace corruption. Proposed solution: Move the feature into the FP context initialization invoked during the thread load environment routine and remove _Context_Fp_start() completely. This is possible because _Context_Initialize_fp() passes a pointer to the FP context handle. The current _Context_Fp_start() is a NOP on all architectures with the exception of some m68k and ColdFire? variants.

Change History (5)

comment:1 Changed on 04/14/09 at 12:36:42 by Rob Platt

Cc: Rob Platt added

comment:2 Changed on 05/02/14 at 17:04:37 by Gedare Bloom

Cc: Gedare Bloom added

comment:3 Changed on 05/05/14 at 05:16:01 by Sebastian Huber

Yes, this is still relevant.

The floating point context is not affected by the recent thread allocation changes since it is optional.

comment:4 Changed on 11/22/14 at 13:33:48 by Gedare Bloom

Milestone: 4.104.10.3

comment:5 Changed on 01/26/17 at 06:33:01 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: newclosed

In [changeset:"27bfcd88f7e65c81b406afa85d81b060e2ea24e3/rtems"]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.
Note: See TracTickets for help on using tickets.