Fix external pointer propagation in nested dereferences (#1837)
* Fix external pointer propagation in nested dereferences and fix the count of indirections for addrof of member dereferences (&A->b). In nested dereferences, a dereference of an external pointer may give a new external pointer. For example, if A is an external pointer, then *A and A->b should also be considered as external pointers when appropriate (e.g., in **A or *(A->b)). In addition, a member dereference is a dereference, so we need to count it when counting the number of indirections in ProbeChecker. If we don't, *(&A->b) won't be rewritten correctly as &A->b will be considered a pointer to an external pointer. * Tests for the count of indirections in nested dereferences
Showing
Please register or sign in to comment