File tree 1 file changed +0
-15
lines changed
compiler-rt/test/sanitizer_common/TestCases 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change 12
12
13
13
extern " C" {
14
14
const volatile void *global_ptr;
15
- int ignore_free = 0 ;
16
15
17
16
#define WRITE (s ) write(1 , s, sizeof (s))
18
17
@@ -28,13 +27,6 @@ void __sanitizer_free_hook(const volatile void *ptr) {
28
27
if (__sanitizer_get_ownership (ptr) && ptr == global_ptr)
29
28
WRITE (" FreeHook\n " );
30
29
}
31
- int __sanitizer_ignore_free_hook (const volatile void *ptr) {
32
- if (__sanitizer_get_ownership (ptr) && ignore_free) {
33
- WRITE (" IgnoreFreeHook\n " );
34
- return 1 ;
35
- }
36
- return 0 ;
37
- }
38
30
} // extern "C"
39
31
40
32
volatile int *x;
@@ -72,13 +64,6 @@ int main() {
72
64
73
65
x[0 ] = 0 ;
74
66
x[127 ] = -1 ;
75
- ignore_free = 1 ;
76
- free ((void *)x);
77
- // CHECK: IgnoreFreeHook
78
-
79
- // Check that the memory is still valid now and hasn't been poisoned.
80
- x[0 ] = 99 ;
81
- ignore_free = 0 ;
82
67
free ((void *)x);
83
68
// CHECK: FH1
84
69
// CHECK: FH2
You can’t perform that action at this time.
0 commit comments