You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go's objects are copy-by-value by default, so copying a struct (or an array) actually copying its elements rather than the reference of the struct. The EAR analysis ("earpointer/analysis.go") approximates this using copy-by-reference. For example,
type T1 struct { ... }
type T2 struct {
x T1
y *int
}
func f(t2 T2) {
t3 := t2
...
}
Currently the analysis unifies t3 and t2 to be {t2, t3}. However w.r.t. the exact semantics we should have {t3.y, t2.y}, and t2.x and t3.x should be unified recursively.
This approximation may lead to false positives.
The text was updated successfully, but these errors were encountered:
Bug report
Go's objects are copy-by-value by default, so copying a struct (or an array) actually copying its elements rather than the reference of the struct. The EAR analysis ("earpointer/analysis.go") approximates this using copy-by-reference. For example,
Currently the analysis unifies
t3
andt2
to be{t2, t3}
. However w.r.t. the exact semantics we should have{t3.y, t2.y}
, andt2.x
andt3.x
should be unified recursively.This approximation may lead to false positives.
The text was updated successfully, but these errors were encountered: