[BUG] Undefined stack protection symbols in MicroBlaze portasm.S
メンテナーはふだん 3 日以内に返信
@furkanyilmazgtb がすでに取り組んでいます。
2026年5月12日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 18/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- c
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C
- スター
- 4.6k
- フォーク
- 1.6k
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FreeRTOS/FreeRTOS-Kernel のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FreeRTOS/FreeRTOS-Kernel#1542 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
FreeRTOS/FreeRTOS-Kernel#1520 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
FreeRTOS/FreeRTOS-Kernel#1494 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
FreeRTOS/FreeRTOS-Kernel#1554 ·
メンテナーはふだん 3 日以内に返信
-
[BUG] event_wait_timed can't return false対応中かも @TedLyngmo が 39 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
FreeRTOS/FreeRTOS-Kernel#1546 ·
メンテナーはふだん 3 日以内に返信
FreeRTOS/FreeRTOS-Kernel の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
shinyquagsire23/OpenJKDF2#540 ·
メンテナーはふだん 12 日以内に返信
-
Prison work hall: laundry and kitchen stations stand at bare walls, the hatch has no counter or signオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Life-Framework/Life-Framework#5939 ·
メンテナーはふだん 1 日以内に返信
-
autoconf failes to find libsodium even when present due to implicit function declaration対応中かも @coderjoe が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 13 日以内に返信
-
Bug Status: Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug python
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
Jstar269/nakagawa-recomp#3521 ·
メンテナーはふだん 1 日以内に返信