Description
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:
Lines 1288 to 1290 in 851c6b3
Second,
reachable_from_value
for some reason excludes NULL
pointers: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 the AD.remove Addr.NullPtr
was introduced without explanation.