Arena-escaping values leak 17,800 bytes at exit (xcalloc/xstrdup in arena.c) — pre-existing, and no suite program exercises the shape
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with src/arena.c, especially xcalloc at line 58 and xstrdup at line 79, then run the preserved arena-escape reproduction with ASAN_OPTIONS=detect_leaks=1. Add an equivalent escape-shape program to the suite corpus before addressing the ownership leak. Done means the corpus program passes the ordinary ASan lane without the reported 17,800-byte leak.
索引モデルが issue の本文から書いたものです。
説明
A program that lets arena-allocated values escape their arena leaks 17,800 bytes at exit under ASan, and the leak is in src/arena.c's own allocators.
Reproduction
The program is a blind critic's arena-escape probe from the #1183 review (a loop that builds strings inside a scope and returns them outward). Any equivalent shape should do; the exact file is preserved at /tmp/strcrit-r4b/c2_21_arena_escape.eigs.
ASAN_OPTIONS=detect_leaks=1 build/asan/eigenscript c2_21_arena_escape.eigs
Direct leak of 14400 byte(s) in 200 object(s) allocated from:
#1 xcalloc src/arena.c:58
Indirect leak of 3400 byte(s) in 200 object(s) allocated from:
#1 xstrdup src/arena.c:79
SUMMARY: AddressSanitizer: 17800 byte(s) leaked in 400 allocation(s).
Exit code 1.
It is PRE-EXISTING — measured, not assumed
Surfaced while reviewing the string cached-length branch (#1183), so the obvious suspicion was that the change caused it. It does not. Both trees were built ASan from source and run on the identical program:
| tree | result |
|---|---|
main @ adf529c, no change |
17800 byte(s) leaked in 400 allocation(s) |
str-cached-length, with the change |
17800 byte(s) leaked in 400 allocation(s) |
Byte-identical, allocation-count identical. The branch is not implicated, and it is filed here rather than counted against it.
Why the suite does not see it
The full ASan suite is green at 5280/5280 with a leak tally of 0, on the same build that leaks here. So this shape is absent from the suite corpus — a green suite is evidence about the corpus, not about the runtime. The arena's escape path is the part with no program exercising it.
That is the more useful half of this report: lib/ and the test corpus contain no program that lets a meaningful number of arena values escape, so the arena/heap ownership seam has no standing witness. Related prior art in this area: the arena-vs-heap reference asymmetry class, where an arena list holding heap items is the failure mode.
Suggested next step
Add the escape shape to the suite corpus first, so the leak is visible to the ordinary ASan lane, then fix. A fix without a corpus program that fails beforehand is unverifiable by the repo's own gates.
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 4時間 15分
- マージ済み PR(30日)
- 106
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
area:lint-tooling bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
InauguralSystems/EigenScript#1340 ·
メンテナーはふだん 1 日以内に返信
-
area:stdlib found-by:code-review kind:silent-wrong
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
InauguralSystems/EigenScript#1338 ·
メンテナーはふだん 1 日以内に返信
-
area:lint-tooling found-by:critic kind:docs-drift
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InauguralSystems/EigenScript#1335 ·
メンテナーはふだん 1 日以内に返信
-
area:ci found-by:critic kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
InauguralSystems/EigenScript#1311 ·
メンテナーはふだん 1 日以内に返信
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetオープンarea:gates found-by:critic kind:decision
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
InauguralSystems/EigenScript#1280 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
sandialabs/seacas#945 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ARM-software/sysarch-acs#556 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
netdata/netdata#24062 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信