A deeply nested query crashes the whole process with `fatal error: stack overflow`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- backend, performance
調査の方向性
Start at the query evaluation path and reproduce the issue with a descendant filter repeated about 200 times against a document nested roughly 7,500 arrays deep; parsing succeeds, and evaluation crashes with a stack overflow. Trace the recursive evaluation involved and compare how the project reports errors for invalid queries. Done means deeply nested input returns a catchable error instead of aborting the process.
索引モデルが issue の本文から書いたものです。
説明
Evaluating a very deeply nested descendant-filter query against a deeply nested document overflows the goroutine stack,
and the Go runtime aborts the entire process with fatal error: stack overflow. It's a fatal runtime error, not a
panic, so recover() can't catch it — anything evaluating user-supplied queries can be taken down by one query.
The query is a descendant filter repeated a few hundred times — roughly $..[?@.*&&[email protected]||@.b|| ... ] about 200 times
over — run against a document that's a few thousand nested empty arrays ([[[ ... ]]]). Parsing succeeds; the crash
happens during evaluation. It aborts consistently at around 200 filter levels over a document about 7500 deep.
For comparison, jsonpath-rust stops at a nesting depth of 128 and jsonpath-rfc9535 raises an error you can catch,
rather than crashing.
- 主要言語
- Go
- スター
- 41
- フォーク
- 4
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
theory/jsonpath のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
theory/jsonpath の issue をすべて見る
似ている issue
-
area: pipeline priority: low type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
prime-radiant-inc/evener#8335 ·
メンテナーはふだん 1 日以内に返信
-
ui: OnTextKey on SearchField never sees keys (it does not reach the inner input)対応中かも @szluyu99 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
router-for-me/CLIProxyAPI#8815 ·
メンテナーはふだん 7 日以内に返信