RTEMS | cpukit/score/cpu/or1k: The port has no thread-local storage (#5685)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Mon Aug 17 02:23:09 UTC 2026
Issue created by Sebastian Huber: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5685
The port declares a thread-local storage variant and implements none of it.
`_CPU_Context_Initialize()` discards the thread-local storage area,
`_CPU_Get_TLS_thread_pointer()` returns NULL, and the context switch skips r10,
which is the thread pointer of the OpenRISC ABI. Every thread therefore shares
whatever value that register holds.
The variant is also the wrong one. The linker of this architecture computes the
offsets relative to a 16 byte thread control block and reserves an aligned block
of that size before the data, so an object with an alignment above 16 bytes
reads as zero.
Found while running the full test suite on Qemu. This description was created
with Claude Code assistance.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5685
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-3obnoa8zluf40t2gpwb66g4y9-1d/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/20260817/0f6c2cea/attachment.htm>
More information about the bugs
mailing list