Soundness: a field write through another object of the same class (`o.x = 5`) is applied to `this.x`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- testing-qa
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 73
- Forks
- 38
- Merge medio
- 12 h 32 min
- PR fusionados (30 d)
- 45
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de liquid-java/liquidjava
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
liquid-java/liquidjava#562 ·
Los mantenedores suelen responder en 1 día
-
A float ghost crashes the verifier: "Ghost not implemented for type float"Posiblemente ocupada @MohammedZaid1740 la tomó hace 7 días. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
liquid-java/liquidjava#443 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug real-world-finding
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
liquid-java/liquidjava#395 ·
Los mantenedores suelen responder en 1 día
-
A ternary between arrays crashes: Sorts (Array Int Int) and Bool are incompatiblePosiblemente ocupada @CatarinaGamboa la tomó hace 4 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
liquid-java/liquidjava#558 ·
Los mantenedores suelen responder en 1 día
-
new T[a][b] gets length b instead of a (unsound)Posiblemente ocupada @CatarinaGamboa la tomó hace 4 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
liquid-java/liquidjava#557 ·
Los mantenedores suelen responder en 1 día
Todos los issues de liquid-java/liquidjava
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
quelea-projection/Quelea#749 ·
Los mantenedores suelen responder en 1 día
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
erkamyaman/rust-anything#963 ·
Los mantenedores suelen responder en 1 día
-
api-diagnostics bug jdbc
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ClickHouse/clickhouse-java#3464 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 76/100
-
Deferred
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Sanne/incus-spawn#2768 ·
Los mantenedores suelen responder en 1 día