|
|
|
|
|
by jcranmer
1172 days ago
|
|
Given the following code: void *p = malloc(N);
do_random_stuff(p);
void *q = malloc(N);
With this rule, the compiler can conclude that p and q cannot alias, even if it doesn't have body of do_random_stuff. Without it, it would first have to prove that p is never freed before calling q, which is basically impossible (moving the body of intervening code into a different file, for example, would do the trick). |
|