Soundness: a field write through another object of the same class (`o.x = 5`) is applied to `this.x`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java
- 領域
- testing-qa
調査の方向性
Start with RefinementTypeChecker.visitAssignment at RefinementTypeChecker.java:255-258 and compare its field write handling with visitCtFieldRead and Utils.accessesTrackedField, which the issue says handles reads. Use the minimal Repro example to check the current result and the control without the write. Done when the same-class write no longer makes verification incorrectly pass and the expected refinement error is reported.
索引モデルが issue の本文から書いたものです。
説明
Impact: a real violation passes verification (missed error).
Description
A field write through another object of the same class (o.x = 5) is recorded as a write to this.x. RefinementTypeChecker.visitAssignment (RefinementTypeChecker.java:255-258) names every CtFieldWrite with Utils.qualifyFieldName, whatever its target. #322 fixed this for reads (visitCtFieldRead checks Utils.accessesTrackedField); this is the write side. Writes to a field of another class (a.x = 5 with A a) and reads of o.x are handled correctly. A write whose target is not this could skip the update of this.x, or havoc it since o may be this.
Minimal reproducer
import liquidjava.specification.Refinement;
public class Repro {
int x;
void m(Repro o) {
o.x = 5;
@Refinement("_ == 5") int k = this.x; // this.x is unknown
}
}
Expected
A Refinement Error at k (this.x may be anything).
Actual
Correct! Passed Verification.
Control: without o.x = 5
Refinement Error: k¹ == x is not a subtype of k¹ == 5
Not a duplicate of #340: that one is about a field's initializer being assumed in another method; here the value comes from a write to a different object in the same method.
Reproduced on main at 1a506fea (liquidjava-verifier 0.0.36).
Context
Found while reviewing #432. Related: #322.
🤖 Generated with Claude Code
- 主要言語
- Java
- スター
- 73
- フォーク
- 38
- 平均マージ
- 12時間 32分
- マージ済み PR(30日)
- 45
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
liquid-java/liquidjava のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
liquid-java/liquidjava#562 ·
メンテナーはふだん 1 日以内に返信
-
A float ghost crashes the verifier: "Ghost not implemented for type float"対応中かも @MohammedZaid1740 が 7 日前に担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
liquid-java/liquidjava#443 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug real-world-finding
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
liquid-java/liquidjava#395 ·
メンテナーはふだん 1 日以内に返信
-
A ternary between arrays crashes: Sorts (Array Int Int) and Bool are incompatible対応中かも @CatarinaGamboa が 4 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
liquid-java/liquidjava#558 ·
メンテナーはふだん 1 日以内に返信
-
new T[a][b] gets length b instead of a (unsound)対応中かも @CatarinaGamboa が 4 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
liquid-java/liquidjava#557 ·
メンテナーはふだん 1 日以内に返信
liquid-java/liquidjava の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
quelea-projection/Quelea#749 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
erkamyaman/rust-anything#963 ·
メンテナーはふだん 1 日以内に返信
-
api-diagnostics bug jdbc
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ClickHouse/clickhouse-java#3464 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 76/100
-
Deferred
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Sanne/incus-spawn#2768 ·
メンテナーはふだん 1 日以内に返信