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

#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 12/03/06 at 13:31:13.
patch

Download all attachments as: .zip

Change History (2)

comment:1 Changed on 04/03/03 at 22:01:49 by Joel Sherrill

Status: assignedclosed

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

Changed on 12/03/06 at 13:31:13 by eric.valette

Attachment: patch added

patch

Note: See TracTickets for help on using tickets.