#381 closed defect (fixed)

libc_start_hook corrupt initial thread stack registers with recent gcc/newlib

Reported by: eric.valette Owned by: Joel Sherrill
Priority: high Milestone: 2
Component: score Version: 4.5
Severity: critical Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

After debugging the ticker problem mentionned by several people on the list, I found that the initial PC was corrupted during execution of user thread extension initialization and precisely by the first libc_start_hook execution.

Looking at the code, the line

*ptr = (struct _reent) _REENT_INIT((*ptr));

seemed a little bit strange. Using the _REENT_INIT_PTR macro curred the problem.

Release:
RTEMS-4.5

Attachments (1)

patch (557 bytes) - added by eric.valette on Dec 3, 2006 at 1:31:13 PM.
patch

Download all attachments as: .zip

Change History (2)

comment:1 Changed on Apr 3, 2003 at 10:01:49 PM by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied. Nice work Eric. Thanks.

Changed on Dec 3, 2006 at 1:31:13 PM by eric.valette

Attachment: patch added

patch

Note: See TracTickets for help on using tickets.