RTEMS | cpukit/score/cpu/mips: An interrupt handler cannot access thread-local objects (#5795)

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



Issue created by Sebastian Huber: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5795



The interrupt handlers run with the exception level set in the status register.  An access to a thread-local object executes `rdhwr`, which raises the reserved instruction exception on processors without this instruction.  With the exception level set, the processor does not update the exception program counter.  The emulation of `rdhwr` then finds another instruction and the exception becomes fatal.

On `mips/malta`, `psxmsgq03` and `spintrcritical24` fail in this way, because their interrupt handlers set `errno`.  A Newlib built with `--enable-newlib-reent-thread-local` keeps `errno` in thread-local storage.

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/5795
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-f09ds7yrg8fo8o4a6k14hx83r-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/20261003/0e02fcf3/attachment.htm>


More information about the bugs mailing list