gcc | microblaze: A 64-bit thread-local store goes to the wrong address (#1)

Sebastian Huber (@sebhub) gitlab at rtems.org
Sat Oct 3 13:33:36 UTC 2026



Issue created by Sebastian Huber: https://gitlab.rtems.org/contrib/gcc/-/work_items/1



`microblaze_classify_address()` accepts a `CONST` which holds a thread-local symbol plus an offset as an absolute address.  Combine substitutes such an address for the second word of a 64-bit thread-local object.  The store then goes to the initialization image of the thread-local storage instead of the object of the thread.

For example, `srand()` of a Newlib built with `--enable-newlib-reent-thread-local` writes the upper word of the seed into this image.  `rand()` then returns a wrong sequence, and the test `newlib01` of RTEMS fails on microblaze.

Found while running the RTEMS test suite on Qemu.  This description was created with Claude Code assistance.

-- 
View it on GitLab: https://gitlab.rtems.org/contrib/gcc/-/work_items/1
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/1200/sent_notifications/5-bjlgaaijelvvrafpudv57xkv3-xc/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20261003/0c48a1bd/attachment.htm>


More information about the bugs mailing list