[BUG] Undefined stack protection symbols in MicroBlaze portasm.S
Los mantenedores suelen responder en 3 días
@furkanyilmazgtb ya está trabajando en esto.
Desde el 12/5/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- c
Línea de trabajo
Start with the offset and context-size definitions near the top of portable/portasm.S in the MicroBlaze port, and check how portSLR_OFFSET, portSHR_OFFSET and portCONTEXT_SIZE are used by the save and restore macros. Two open pull requests (#1417 and #1442) already target this, so read them before writing anything new. Done means the assembly builds with XPAR_MICROBLAZE_USE_STACK_PROTECTION across the FPU on/off and __arch64__ combinations, with the offsets consistent in each.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
In the MicroBlazeV9 FreeRTOS port, enabling XPAR_MICROBLAZE_USE_STACK_PROTECTION requires portSLR_OFFSET and portSHR_OFFSET to be part of the saved task context layout. In portable/portasm.S, these offsets were used in save/restore macros but were not fully integrated with context size/offset definitions, which can lead to undefined-symbol assembler errors or task-context layout mismatch depending on configuration.
This fix integrates stack-protection offsets into context-size definitions for both 32-bit and __arch64__ builds, and aligns portCONTEXT_SIZE / portMINUS_CONTEXT_SIZE with optional FPU + stack-protection fields.
Target
- Development board: [MicroBlaze-based custom board]
- Instruction Set Architecture: [MicroBlaze 32-bit (primary), MicroBlaze 64-bit path also updated]
- IDE and version: [Vitis / XSCT based flow - 2023.2 Classics]
- Toolchain and version: [mb-gcc ]
Host
- Host OS: [Windows 11 Pro 25H2]
To Reproduce
- Use FreeRTOS v11.3.0 MicroBlaze port with
XPAR_MICROBLAZE_USE_STACK_PROTECTIONenabled. - Build
portable/portasm.Spath with different combinations of:XPAR_MICROBLAZE_USE_FPU= 0/1__arch64__defined/undefined
Expected behavior
When stack protection is enabled, SLR/SHR registers must have valid context offsets and context frame size must include these fields consistently for all relevant config combinations (32-bit/64-bit, FPU on/off). Save and restore paths should be layout-compatible and stable.
Screenshots
Additional context
Patch summary applied in portable/portasm.S:
- Added conditional stack-protection offsets and adjusted context size in the same definition block:
- 32-bit + FPU:
portFSR_OFFSET=132,portSLR_OFFSET=136,portSHR_OFFSET=140,portCONTEXT_SIZE=144 - 32-bit no FPU:
portSLR_OFFSET=132,portSHR_OFFSET=136,portCONTEXT_SIZE=140 - 64-bit + FPU:
portFSR_OFFSET=264,portSLR_OFFSET=272,portSHR_OFFSET=280,portCONTEXT_SIZE=288 - 64-bit no FPU:
portSLR_OFFSET=264,portSHR_OFFSET=272,portCONTEXT_SIZE=280
- 32-bit + FPU:
- Removed duplicate
portFSR_OFFSETdefine in offset section to avoid macro redefinition/confusion.
Link to issue post: https://forums.freertos.org/t/microblaze-compilation-error-when-upgrading-to-freertos-v11-3-0/24994
- Lenguaje dominante
- C
- Estrellas
- 4.6k
- Forks
- 1.6k
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de FreeRTOS/FreeRTOS-Kernel
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
FreeRTOS/FreeRTOS-Kernel#1542 ·
Los mantenedores suelen responder en 3 días
-
[BUG] Release asset FreeRTOS-KernelV11.3.2.zip has the files of main, not of the tag V11.3.2Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
FreeRTOS/FreeRTOS-Kernel#1520 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
FreeRTOS/FreeRTOS-Kernel#1494 · 3 comentarios ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
FreeRTOS/FreeRTOS-Kernel#1554 ·
Los mantenedores suelen responder en 3 días
-
[BUG] event_wait_timed can't return falsePosiblemente ocupada @TedLyngmo la tomó hace 39 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
FreeRTOS/FreeRTOS-Kernel#1546 ·
Los mantenedores suelen responder en 3 días
Todos los issues de FreeRTOS/FreeRTOS-Kernel
Issues similares
-
RecompLauncher supportAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
shinyquagsire23/OpenJKDF2#540 ·
Los mantenedores suelen responder en 12 días
-
Prison work hall: laundry and kitchen stations stand at bare walls, the hatch has no counter or signAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Life-Framework/Life-Framework#5939 ·
Los mantenedores suelen responder en 1 día
-
autoconf failes to find libsodium even when present due to implicit function declarationPosiblemente ocupada @coderjoe la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 13 días
-
SessionInterfaceHandler is throwing a deprecation notice as a warning instead of a deprecationAbiertoBug Status: Needs Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
enhancement_package: a site operand of another JSON type raises TypeError, not a named refusalAbiertobug python
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Jstar269/nakagawa-recomp#3521 ·
Los mantenedores suelen responder en 1 día