Summary: It weakens canonical path in order to avoid an explosion of locations when a struct type has pointers to struct. For example: ``` struct Tree { struct Tree *root; struct Tree *left; struct Tree *right; }; ``` It was able to generate lots of abstract locations before this diff: ``` t->root t->left t->right t->root->left t->root->right t->left->root t->left->right t->right->root t->right->left t->root->left->right t->root->right->left t->left->root->right t->left->right->root t->right->root->left t->right->left->root ``` By this diff, pointer fields that have the same type are (unsoundly) canonicalized to the same one. For example, ``` t->root t->root->left t->root->right t->root->left->right t->root->right->left ``` are canonicalized to `t->root`. This is definitely unsound but I believe it is better than the location explosion by which analyses do not terminate in a reasonable time or giving a fixed limit of depth to the field access. Reviewed By: mbouaziz Differential Revision: D13503808 fbshipit-source-id: 867018712master
parent
1f2b0d4152
commit
fc26f79b92
Loading…
Reference in new issue