• yonghong-song's avatar
    Fix external pointer propagation in nested dereferences (#1837) · d17d5a8f
    yonghong-song authored
    * 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
    d17d5a8f
test_clang.py 29.8 KB