Summary: While adding a footprint frame during rearrangement, the footprint variables should be fresh with respect to the current state too, not only with respect to he footprint, because the frame is added to the state. Reviewed By: jberdine Differential Revision: D14401026 fbshipit-source-id: 20ea4485amaster
parent
05f14391a6
commit
e226cf8ec4
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2019-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
void (*global)(void**);
|
||||
|
||||
struct T {
|
||||
void (*go)();
|
||||
};
|
||||
|
||||
struct S {
|
||||
struct T* t;
|
||||
void* x;
|
||||
};
|
||||
|
||||
void doit(void** x) {
|
||||
if (global != 0) {
|
||||
global(x);
|
||||
}
|
||||
}
|
||||
|
||||
void f(struct S* s) {
|
||||
if (s == 0)
|
||||
return;
|
||||
doit(&s->x);
|
||||
if (s->t->go) { // should *not* give NULL_TEST_AFTER_DEREFERENCE
|
||||
s->t->go();
|
||||
}
|
||||
}
|
||||
|
||||
void fail(int* x) {
|
||||
if (x == 0) {
|
||||
*x = 1; // should give NULL_DEREFERENCE
|
||||
}
|
||||
}
|
||||
|
||||
int main() {}
|
Loading…
Reference in new issue