fix(nft): the per-batch markersAdded() call is not guarded against re-entry
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with NFTDetector.h and the per-batch markersAdded() call at the end of addNFTMarkers(); compare it with the guarded calls in ensureDetector() and the creation backfill. Then add tests for a second batch whose callback calls teardown() and addNFTMarkers(). Decide and document the outcome for already committed markers, and verify that nested calls are refused and the detector remains alive until its callback returns.
索引モデルが issue の本文から書いたものです。
説明
NFTDetector.h says that a call back into the core from markersAdded() is refused before it changes anything, and that the outer addNFTMarkers() / setupAR2() fails. That holds for the calls made from ensureDetector(), the backfill at creation, which runs under CreatingGuard. But the per-batch call at the end of addNFTMarkers() runs outside the guard:
if (batchSize > 0 && this->detector) {
this->detector->markersAdded(markerIds, datasetPathnames);
}
From there, teardown(), setupAR2() or setCamera() is not refused. It destroys the detector while its markersAdded() is still running, which is undefined behaviour. addNFTMarkers() recurses.
Found by Qodo on #129. Introduced by #116; #124 added the guard for the creation path only. It only shows with a detector that breaks the documented contract, so it does not block 0.13.0.
To decide
When the per-batch call runs, the batch is already committed: ids are assigned and the KPM reference data is set. Returning {} at that point would report a failure for markers that are loaded. Options:
- refuse the nested call, discard the detector, log, and still return the ids, so the next
setupAR2()recreates the detector; updateNFTDetector.hto say so; - or notify before committing, and roll back if the detector re-entered.
Fix sketch
Share the RAII guard of ensureDetector() with the per-batch call. Afterwards, check creationReentered and whether the detector or the handles changed.
Test
A second batch whose markersAdded() calls teardown(), and separately addNFTMarkers(). The nested call must be refused, the detector must stay alive until its callback returns, and the outcome must match the chosen contract.
- 主要言語
- C++
- スター
- 21
- フォーク
- 8
- 平均マージ
- 3時間 42分
- マージ済み PR(30日)
- 22
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
webarkit/WebARKitLib のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
webarkit/WebARKitLib#131 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
webarkit/WebARKitLib#114 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 93/100
webarkit/WebARKitLib#107 ·
メンテナーはふだん 1 日以内に返信
-
build: native build fails with GCC 15 (ubuntu-26.04): implicit fopen64 in vendored ioapi.c対応中かも @kalwalt が 6 日前に担当しました。 オープンbug CI
webarkit/WebARKitLib#118 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
feat(nft): let a consumer supply its own NFTDetector対応中かも @kalwalt が 6 日前に担当しました。 オープンC/C++ code documentation Emscripten enhancement
webarkit/WebARKitLib#115 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
webarkit/WebARKitLib の issue をすべて見る
似ている issue
-
bug fixed form parser medium priority tokenizer
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
compatibility prio:normal
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NatronGitHub/openfx-misc#320 ·
メンテナーはふだん 1 日以内に返信
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client area対応中かも @lijy91 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
libnativeapi/nativeapi#53 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
agent-ready area:analysis bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
pauljohanneskraft/Acai#609 ·
メンテナーはふだん 10 日以内に返信