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



A Newlib built with `--enable-newlib-reent-thread-local` keeps `errno` and its 
reentrancy structure in thread-local storage.  Several BSPs call C library 
functions which set `errno` or use the reentrancy structure:

| BSP | Code |
| --- | --- |
| x86_64/amd64 | `printf()` in `paging_init()`, `strtol()` for the ACPI RSDP, 
the ACPI OS layer |
| mips/malta, i386/pc386 | `malloc()`, `calloc()` and `realloc()` in 
`ns16550_init()` and the legacy console |
| i386/pc386 | the PCI UART probe, the video and the GDB options |

This has two effects.  Every application holds thread-local objects, so tests 
such as `sptls01` which require an application without them fail.  The 
validation test suites of amd64 stop with `INTERNAL_ERROR_TOO_LARGE_TLS_SIZE`.  
Code which runs before the thread pointer exists faults.  On amd64, Qemu offers 
no 1 GiB pages for the `qemu64` processor, so `paging_init()` prints a warning, 
and twenty validation test suites end with a triple fault before their first 
output.

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/5797
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-a13aybe0fbc63sc8dnpvnbjeo-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to