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
In #1174 I made pthread_join invalidate its second argument with w instead of the default r_deep; w_deep; s_deep. Surprisingly, this caused test failures due to additional unknown pointer accesses if the pthread_join argument happens to be NULL.
This means that the MayPointTo for w accesses returns more addresses than ReachableFrom for w_deep, although I've always thought the former should be a subset of the latter as the latter is a recursive closure of the former. But apparently not?!
First, ReachableFrom for some reason excludes unknown pointers:
There's also a third difference which affects NULL constants in particular because they evaluate to Int variants in base. MayPointTo returns the top pointer for them:
In #1174 I made
pthread_join
invalidate its second argument withw
instead of the defaultr_deep; w_deep; s_deep
. Surprisingly, this caused test failures due to additional unknown pointer accesses if thepthread_join
argument happens to beNULL
.This means that the
MayPointTo
forw
accesses returns more addresses thanReachableFrom
forw_deep
, although I've always thought the former should be a subset of the latter as the latter is a recursive closure of the former. But apparently not?!First,
ReachableFrom
for some reason excludes unknown pointers:analyzer/src/analyses/base.ml
Lines 1288 to 1290 in 851c6b3
Second,
reachable_from_value
for some reason excludesNULL
pointers:analyzer/src/analyses/base.ml
Line 523 in 851c6b3
This explains why
ReachableFrom NULL
doesn't yield any accesses, but it doesn't explain why those exclusions are there in the first place.In a4fb621
reachable_from_value
was not just moved around but also theAD.remove Addr.NullPtr
was introduced without explanation.The text was updated successfully, but these errors were encountered: