From c41cba92ea424179d044442b9b4e663f5eac4555 Mon Sep 17 00:00:00 2001 From: Dino Distefano Date: Wed, 10 Feb 2016 07:47:37 -0800 Subject: [PATCH] Fixed test for taint analysis Reviewed By: cristianoc Differential Revision: D2917167 fb-gh-sync-id: e124533 shipit-source-id: e124533 --- .../objc/errors/taint/viewController.m | 15 --------------- infer/tests/endtoend/objc/TaintTest.java | 6 ++++-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/infer/tests/codetoanalyze/objc/errors/taint/viewController.m b/infer/tests/codetoanalyze/objc/errors/taint/viewController.m index 6b5f609f5..8c0c90bfd 100644 --- a/infer/tests/codetoanalyze/objc/errors/taint/viewController.m +++ b/infer/tests/codetoanalyze/objc/errors/taint/viewController.m @@ -22,10 +22,6 @@ BOOL ExampleSanitizer(NSURL * u, int f) @end @implementation ExampleViewController -- (void) dealloc -{ - [self dealloc]; -} - (void)loadURL:(NSURL *)URL trackingCodes: (NSArray *)trackingCodes { @@ -38,15 +34,10 @@ BOOL ExampleSanitizer(NSURL * u, int f) @end @implementation B -- (void) dealloc -{ - [self dealloc]; -} - (void) another_url_pass: (NSURL *) u { ExampleViewController *vc = [[ExampleViewController alloc] init]; [vc loadURL:u trackingCodes:nil]; - [vc dealloc]; } @end @@ -55,15 +46,10 @@ BOOL ExampleSanitizer(NSURL * u, int f) @end @implementation A -- (void) dealloc -{ - [self dealloc]; -} - (void) pass_url_arond: (NSURL *) u { B* b = [[B alloc] init]; [b another_url_pass:u]; - [b dealloc]; } @end @@ -88,7 +74,6 @@ BOOL ExampleSanitizer(NSURL * u, int f) if (!ExampleSanitizer(URL, 1 )) { [a pass_url_arond:URL]; // No taint } - [a dealloc]; return YES; } @end diff --git a/infer/tests/endtoend/objc/TaintTest.java b/infer/tests/endtoend/objc/TaintTest.java index a9ba218e4..e990bab7c 100644 --- a/infer/tests/endtoend/objc/TaintTest.java +++ b/infer/tests/endtoend/objc/TaintTest.java @@ -40,9 +40,11 @@ public class TaintTest { @BeforeClass public static void runInfer() throws InterruptedException, IOException { - inferCmd = InferRunner.createObjCInferCommand( + inferCmd = InferRunner.createObjCInferCommandWithMLBuckets( folder, - TaintFile); + TaintFile, + "cf", + false); } @Test