Potential thread stack overflow in SystemTask::Process
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- cmake, cpp
調査の方向性
リンク先の SystemTask::Process の位置にある src/systemtask/SystemTask.cpp と、CMakeLists.txt のスタック使用量オプションから始めてください。make pinetime-app でビルドし、生成された .su ファイルを調べ、報告された Process から littlefs への呼び出し経路を追跡してください。1432 バイトの経路がスレッドスタックを超えるかどうかを判断し、その結果に対処するか文書化すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Issue details
While some detailed build configuration, There are potential stack overflow in thread function named SystemTask::Process
In this line, SystemTask::Process Allows 1400(350*4) stack size.
However, after checking the stack using our internally developed tool, it might have 1432 Bytes in with some detailed configurations.
Steps to produce
1. In CMakeLists.txt , Add this line:
add_compile_options(
$<$<COMPILE_LANGUAGE:C>:-fstack-usage>
$<$<COMPILE_LANGUAGE:CXX>:-fstack-usage>
)
This will help you automatically calculating stack size of each function.
2. Build InfiniTime normally, using this configurations:
make pinetime-app
Now we can get stack usage file (*.su) for each source file, So we can manually check stack size of each function.
In case of SystemTask::Process :
There are large call stack with this flow:
Pinetime::System::SystemTask::Process (_ZN8Pinetime6System10SystemTask7ProcessEPv) => 8 bytes
Pinetime::System::SystemTask::Work (_ZN8Pinetime6System10SystemTask4WorkEv) => 64 bytes
Pinetime::Controllers::NimbleController::Init(_ZN8Pinetime11Controllers16NimbleController4InitEv) => 24 bytes
Pinetime::Controllers::NimbleController::RestoreBond(_ZN8Pinetime11Controllers16NimbleController11RestoreBondEv) => 272 bytes
Pinetime::Controllers::FS::FileDelete(_ZN8Pinetime11Controllers2FS10FileDeleteEPKc) => 0 bytes
lfs_remove(lfs_remove) => 120 bytes
lfs_fs_forceconsistency(lfs_fs_forceconsistency) => 144 bytes
lfs_dir_drop(lfs_dir_drop) => 24 bytes
lfs_dir_commit(lfs_dir_commit) => 168 bytes
lfs_dir_compact(lfs_dir_compact) => 160 bytes
lfs_dir_split(lfs_dir_split) => 88 bytes
lfs_dir_alloc(lfs_dir_alloc) => 32 bytes
lfs_alloc(lfs_alloc) => 24 bytes
lfs_fs_rawtraverse(lfs_fs_rawtraverse) => 104 bytes
lfs_dir_fetch(lfs_dir_fetch) => 24 bytes
lfs_dir_fetchmatch(lfs_dir_fetchmatch) => 112 bytes
lfs_bd_read(lfs_bd_read) => 64 bytes
SUM => 1432 bytes
So, there are potentially occur stack overflow in SystemTask::Process Thread function.
Environment
Version
Commit https://github.com/InfiniTimeOrg/InfiniTime/commit/7128fc045db083c7014166872b50b536942c06e0
- 主要言語
- C
- スター
- 3.4k
- フォーク
- 1.1k
- 平均マージ
- 23時間 18分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InfiniTimeOrg/InfiniTime のほかの issue
-
BLE handlers use length fields from the packet without checking how much data arrived対応中かも @DustinHab が 39 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
InfiniTimeOrg/InfiniTime#2485 ·
-
Unexpected jump back to watch face when button pressed対応中かも @SteveAmor が 82 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
InfiniTimeOrg/InfiniTime#2461 · コメント 2 件 ·
-
Screen doesn't go to sleep after reset countdown app対応中かも @SteveAmor が 80 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
InfiniTimeOrg/InfiniTime#2419 · コメント 4 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
InfiniTimeOrg/InfiniTime#2410 ·
-
enhancement UI/UX
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
InfiniTimeOrg/InfiniTime#2405 · コメント 2 件 · リアクション 1 件 ·
InfiniTimeOrg/InfiniTime の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
valkey-io/valkey#4979 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
colbymchenry/codegraph#2770 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
OpenCyphal/libcanard#264 ·
-
area/ysql kind/enhancement priority/medium status/awaiting-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
yugabyte/yugabyte-db#35578 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信