forked from OSchip/llvm-project
Fix memory leaks in address sanitizer darwin tests
Summary: These leaks are detected by leak sanitizer for darwin. Reviewers: glider, kubamracek, kcc, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31978 llvm-svn: 300080
This commit is contained in:
parent
a4961fe8ef
commit
e9438b35aa
|
@ -237,4 +237,5 @@ void TestNSURLDeallocation() {
|
|||
[[NSURL alloc] initWithString:@"Saved Application State"
|
||||
relativeToURL:base];
|
||||
[u release];
|
||||
[base release];
|
||||
}
|
||||
|
|
|
@ -47,5 +47,6 @@ int main() {
|
|||
memset(mem[i], 'a', 8 * (i % kNumIter));
|
||||
free(mem[i]);
|
||||
}
|
||||
malloc_destroy_zone(zone);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -54,4 +54,5 @@ int main() {
|
|||
fprintf(stderr, "okthxbai!\n");
|
||||
// CHECK-SCRIBBLE: okthxbai!
|
||||
// CHECK-NOSCRIBBLE: okthxbai!
|
||||
free(my_class_isa);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ int main() {
|
|||
kCFStringEncodingUTF8, FALSE); // BOOM
|
||||
fprintf(stderr, "Ignored.\n");
|
||||
free(a);
|
||||
CFRelease(str);
|
||||
}
|
||||
|
||||
// CHECK-CRASH: AddressSanitizer: heap-buffer-overflow
|
||||
|
|
|
@ -18,6 +18,7 @@ int main() {
|
|||
kCFStringEncodingUTF8, FALSE); // BOOM
|
||||
fprintf(stderr, "Ignored.\n");
|
||||
free(a);
|
||||
CFRelease(str);
|
||||
}
|
||||
|
||||
// CHECK-CRASH: AddressSanitizer: heap-buffer-overflow
|
||||
|
|
Loading…
Reference in New Issue