From 4f79585eb061de98dea537e7b245dc3f5f6f8846 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 8 Jun 2020 09:00:38 -0700 Subject: [PATCH] record objc tests Summary: Some recent severity changes broke them. Reviewed By: ngorogiannis Differential Revision: D21931247 fbshipit-source-id: 6b681b32d --- .../codetoanalyze/objc/biabduction/issues.exp | 26 +++++++++---------- .../objcpp/biabduction/issues.exp | 2 +- .../objcpp/retain-cycles/issues.exp | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/infer/tests/codetoanalyze/objc/biabduction/issues.exp b/infer/tests/codetoanalyze/objc/biabduction/issues.exp index 873e65566..c07e577f4 100644 --- a/infer/tests/codetoanalyze/objc/biabduction/issues.exp +++ b/infer/tests/codetoanalyze/objc/biabduction/issues.exp @@ -1,9 +1,9 @@ -codetoanalyze/objc/biabduction/field_superclass/field.c, field_superclass_main, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure field_superclass_main()] +codetoanalyze/objc/biabduction/field_superclass/field.c, field_superclass_main, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure field_superclass_main()] codetoanalyze/objc/biabduction/field_superclass/field.c, field_superclass_main, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure field_superclass_main()] codetoanalyze/objc/biabduction/global_const/global_const.m, SimpleRoot.doSomethingBadWithDict:andString:, 3, NULL_DEREFERENCE, B2, ERROR, [start of procedure doSomethingBadWithDict:andString:,Message stringByAppendingString: with receiver nil returns nil.] codetoanalyze/objc/biabduction/global_const/global_const.m, SimpleRoot.doSomethingOkWithDict:andString:, 3, NULL_DEREFERENCE, B2, ERROR, [start of procedure doSomethingOkWithDict:andString:,Message stringByAppendingString: with receiver nil returns nil.] codetoanalyze/objc/biabduction/initialization/compound_literal.c, init_with_compound_literal, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure init_with_compound_literal()] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV.foo, 13, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure foo,Executing synthesized setter setHandler:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV.foo, 13, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure foo,Executing synthesized setter setHandler:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV.foo, 13, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure foo,Executing synthesized setter setHandler:] codetoanalyze/objc/biabduction/npe/null_returned_by_method.m, NullReturnedByMethodA.test1, 1, NULL_DEREFERENCE, B5, ERROR, [start of procedure test1,start of procedure test,return from a call to NullReturnedByMethodA.test] codetoanalyze/objc/biabduction/procdescs/main.c, ProcdescMain, 3, MEMORY_LEAK, no_bucket, ERROR, [start of procedure ProcdescMain(),Skipping plusX:andY:: method has no implementation] @@ -30,23 +30,23 @@ codetoanalyze/objc/biabduction/field_superclass/SubtypingExample.m, subtyping_te codetoanalyze/objc/biabduction/initialization/struct_initlistexpr.c, field_set_correctly, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure field_set_correctly()] codetoanalyze/objc/biabduction/initialization/struct_initlistexpr.c, implicit_expr_set_correctly, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure implicit_expr_set_correctly()] codetoanalyze/objc/biabduction/initialization/struct_initlistexpr.c, point_coords_set_correctly, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure point_coords_set_correctly()] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockAsParameter.m, FBSomeDataManager.fetchNewData, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure fetchNewData,start of procedure initWithCompletionBlock:,return from a call to Fetcher.initWithCompletionBlock:_objc_blockFBSomeDataManager.fetchNewData_1] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockAsParameter.m, FBSomeDataManager.fetchNewData, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure fetchNewData,start of procedure initWithCompletionBlock:,return from a call to Fetcher.initWithCompletionBlock:_objc_blockFBSomeDataManager.fetchNewData_1] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockAsParameter.m, FBSomeDataManager.fetchNewData, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure fetchNewData,start of procedure initWithCompletionBlock:,return from a call to Fetcher.initWithCompletionBlock:_objc_blockFBSomeDataManager.fetchNewData_1] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockCapturedVar.m, LinkResolver.test_bad, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure test_bad,Executing synthesized setter setDidFinishLoad:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockCapturedVar.m, LinkResolver.test_bad, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure test_bad,Executing synthesized setter setDidFinishLoad:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockCapturedVar.m, LinkResolver.test_bad, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure test_bad,Executing synthesized setter setDidFinishLoad:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, RCBlock.retain_self_in_block, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure retain_self_in_block,Executing synthesized setter setHandler:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, RCBlock.retain_self_in_block, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure retain_self_in_block,Executing synthesized setter setHandler:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, RCBlock.retain_self_in_block, 1, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_self_in_block,Executing synthesized setter setHandler:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, objc_blockretain_a_in_block_cycle_3, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure block,Executing synthesized setter setChild:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, objc_blockretain_a_in_block_cycle_3, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure block,Executing synthesized setter setChild:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, objc_blockretain_a_in_block_cycle_3, 1, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure block,Executing synthesized setter setChild:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, retain_a_in_block_cycle, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure retain_a_in_block_cycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, retain_a_in_block_cycle, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure retain_a_in_block_cycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, retain_a_in_block_cycle, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_a_in_block_cycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleDeduplication.m, CViewController.setCaptureInteractionController:, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure setCaptureInteractionController:,Taking true branch,Executing synthesized setter setDelegate:,Executing synthesized setter setDelegate:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleDeduplication.m, CViewController.setCaptureInteractionController:, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure setCaptureInteractionController:,Taking true branch,Executing synthesized setter setDelegate:,Executing synthesized setter setDelegate:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleDeduplication.m, CViewController.setCaptureInteractionController:, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure setCaptureInteractionController:,Taking true branch,Executing synthesized setter setDelegate:,Executing synthesized setter setDelegate:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, MyCustomViewController.loadViewBad, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure loadViewBad,Executing synthesized setter setView:,Executing synthesized setter setStrong_delegate:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, MyCustomViewController.loadViewBad, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure loadViewBad,Executing synthesized setter setView:,Executing synthesized setter setStrong_delegate:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, MyCustomViewController.loadViewBad, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure loadViewBad,Executing synthesized setter setView:,Executing synthesized setter setStrong_delegate:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle2.m, strongcycle2, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure strongcycle2(),start of procedure init,return from a call to Parent.init,start of procedure init,return from a call to Child.init,start of procedure setChild:,return from a call to Parent.setChild:,start of procedure setParent:,return from a call to Child.setParent:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle2.m, strongcycle2, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle2(),start of procedure init,return from a call to Parent.init,start of procedure init,return from a call to Child.init,start of procedure setChild:,return from a call to Parent.setChild:,start of procedure setParent:,return from a call to Child.setParent:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle2.m, strongcycle2, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle2(),start of procedure init,return from a call to Parent.init,start of procedure init,return from a call to Child.init,start of procedure setChild:,return from a call to Parent.setChild:,start of procedure setParent:,return from a call to Child.setParent:] codetoanalyze/objc/biabduction/npe/UpdateDict.m, add_nil_in_dict, 10, NULL_DEREFERENCE, B1, ERROR, [start of procedure add_nil_in_dict(),Skipping dictionaryWithObjectsAndKeys:: method has no implementation] codetoanalyze/objc/biabduction/npe/UpdateDict.m, add_nil_to_array, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure add_nil_to_array()] @@ -81,12 +81,12 @@ codetoanalyze/objc/biabduction/property/ExplicitIvarName.m, ExplicitIvarNameA.te codetoanalyze/objc/biabduction/subtyping/KindOfClassExample.m, shouldThrowDivideByZero1, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure shouldThrowDivideByZero1(),start of procedure init,return from a call to Base.init,start of procedure returnsZero1:,Taking true branch,return from a call to Base.returnsZero1:] codetoanalyze/objc/biabduction/subtyping/KindOfClassExample.m, shouldThrowDivideByZero2, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure shouldThrowDivideByZero2(),start of procedure init,return from a call to Base.init,start of procedure returnsZero2(),Taking false branch,return from a call to returnsZero2] codetoanalyze/objc/biabduction/subtyping/KindOfClassExample.m, shouldThrowDivideByZero3, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure shouldThrowDivideByZero3(),start of procedure init,return from a call to Derived.init,Taking true branch] -codetoanalyze/objc/biabduction/variadic_methods/premature_nil_termination.m, PrematureNilTermA.nilInArrayWithObjects, 5, PREMATURE_NIL_TERMINATION_ARGUMENT, B1, ERROR, [start of procedure nilInArrayWithObjects] +codetoanalyze/objc/biabduction/variadic_methods/premature_nil_termination.m, PrematureNilTermA.nilInArrayWithObjects, 5, PREMATURE_NIL_TERMINATION_ARGUMENT, B1, WARNING, [start of procedure nilInArrayWithObjects] codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m, TollBridgeExample.bridge, 2, MEMORY_LEAK, no_bucket, ERROR, [start of procedure bridge] codetoanalyze/objc/biabduction/memory_leaks_benchmark/CoreVideoExample.m, CoreVideoExample.cvpixelbuffer_not_released_leak, 1, MEMORY_LEAK, no_bucket, ERROR, [start of procedure cvpixelbuffer_not_released_leak] codetoanalyze/objc/biabduction/memory_leaks_benchmark/NSData_models_tests.m, NSData_models_tests.macForIV:, 2, MEMORY_LEAK, no_bucket, ERROR, [start of procedure macForIV:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/NSString_models_tests.m, StringInitA.hexStringValue, 11, MEMORY_LEAK, no_bucket, ERROR, [start of procedure hexStringValue,Skipping CFStringCreateWithBytesNoCopy(): method has no implementation,Taking false branch] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setC:,Executing synthesized setter setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setC:,Executing synthesized setter setA:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setC:,Executing synthesized setter setA:] codetoanalyze/objc/biabduction/npe/Fraction.m, test_virtual_call, 7, NULL_DEREFERENCE, B1, ERROR, [start of procedure test_virtual_call(),start of procedure setNumerator:,return from a call to Fraction.setNumerator:,start of procedure getNumerator,return from a call to Fraction.getNumerator,Taking true branch] codetoanalyze/objc/biabduction/npe/Npe_with_equal_names.m, EqualNamesTest, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure EqualNamesTest(),start of procedure meth,return from a call to EqualNamesA.meth] diff --git a/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp b/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp index 1f3c1797e..7f30b6877 100644 --- a/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp +++ b/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp @@ -2,5 +2,5 @@ codetoanalyze/objcpp/biabduction/BlockLfield.mm, A.mOk, 1, PRECONDITION_NOT_FOUN codetoanalyze/objcpp/biabduction/BlockLfield.mm, CFunWithBlockOk, 2, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure CFunWithBlockOk()] codetoanalyze/objcpp/biabduction/BlockLfield.mm, CFunWithBlockOk_objc_blockA.mOk_1, 2, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure CFunWithBlockOk()] codetoanalyze/objcpp/biabduction/c_functions.mm, main, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure main(),start of procedure autoUpdating,return from a call to A.autoUpdating,start of procedure autoUpdating2,Skipping dispatch_once2(): method has no implementation,return from a call to A.autoUpdating2,Executing synthesized getter block,start of procedure block,return from a call to objc_blockobjc_blockA.autoUpdating_1_2,Message block with receiver nil returns nil.] -codetoanalyze/objcpp/biabduction/retain_cycles/RetainCycleWithStruct.mm, Animation.tracer, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure tracer,start of procedure _State,return from a call to _State::_State,start of procedure initWithAnimation:,Taking true branch,return from a call to Tracer.initWithAnimation:] +codetoanalyze/objcpp/biabduction/retain_cycles/RetainCycleWithStruct.mm, Animation.tracer, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure tracer,start of procedure _State,return from a call to _State::_State,start of procedure initWithAnimation:,Taking true branch,return from a call to Tracer.initWithAnimation:] codetoanalyze/objcpp/biabduction/retain_cycles/RetainCycleWithStruct.mm, Animation.tracer, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure tracer,start of procedure _State,return from a call to _State::_State,start of procedure initWithAnimation:,Taking true branch,return from a call to Tracer.initWithAnimation:] diff --git a/infer/tests/codetoanalyze/objcpp/retain-cycles/issues.exp b/infer/tests/codetoanalyze/objcpp/retain-cycles/issues.exp index f323f446c..2f30fe256 100644 --- a/infer/tests/codetoanalyze/objcpp/retain-cycles/issues.exp +++ b/infer/tests/codetoanalyze/objcpp/retain-cycles/issues.exp @@ -1,2 +1,2 @@ -codetoanalyze/objcpp/retain-cycles/ObjCPPStruct.mm, A.aFnBad, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, ERROR, [start of procedure aFnBad,start of procedure WeakHolder,return from a call to WeakHolder::WeakHolder] +codetoanalyze/objcpp/retain-cycles/ObjCPPStruct.mm, A.aFnBad, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure aFnBad,start of procedure WeakHolder,return from a call to WeakHolder::WeakHolder] codetoanalyze/objcpp/retain-cycles/ObjCPPStruct.mm, A.aFnBad, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure aFnBad,start of procedure WeakHolder,return from a call to WeakHolder::WeakHolder]