You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[tests] [2/n] Adapt a test about treating nil messaging in Objective-C and move it to Pulse
Summary: Adapted this test to compile with ARC and to be more clear. It tests that we handle correctly the fact that messaging nil in Objective-C returns nil. Copied it to Pulse and removed it from biabduction since it doesn't work as expected in biabduction.
Reviewed By: skcho
Differential Revision: D32430172
fbshipit-source-id: 80b786cc3
codetoanalyze/objc/pulse/null_deref/NPENilInsertionIntoCollection.m, testNilMessagingForModelNotNilDictBad, 1, NIL_INSERTION_INTO_COLLECTION, no_bucket, ERROR, [is the null pointer,when calling `addObjectInDict` here,parameter `value` of addObjectInDict,in call to `NSMutableDictionary.setObject:forKey:` (modelled),invalid access occurs here]
46
46
codetoanalyze/objc/pulse/null_deref/SpecWithBlocksProcnameExample.m, SpecWithBlocksProcnameExample.nilBlockCallBadLatent:, 2, NIL_BLOCK_CALL_LATENT, no_bucket, ERROR, [is the null pointer,when calling `ContentSource.matchLocal:external:[specialized with blocks]` here,parameter `externalMatchHandler` of ContentSource.matchLocal:external:[specialized with blocks],invalid access occurs here]
47
47
codetoanalyze/objc/pulse/null_deref/dynamic_dispatch.m, DynamicDispatchMain.no_dynamic_dispatch_npe_bad, 2, NULLPTR_DEREFERENCE, no_bucket, ERROR, [in call to `DynamicDispatchMain.get_ddclass_from_instance:`,in call to `PInstance.get_ddclass`,is the null pointer,returned,return from call to `PInstance.get_ddclass`,returned,return from call to `DynamicDispatchMain.get_ddclass_from_instance:`,invalid access occurs here]
48
+
codetoanalyze/objc/pulse/null_deref/nil_param.m, NilParamNpeBad, 2, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is the null pointer,in call to `NilParamA.test:`,parameter `other` of NilParamA.test:,in call to `NilParamA.newObject`,parameter `self` of NilParamA.newObject,a message sent to nil returns nil,return from call to `NilParamA.newObject`,returned,return from call to `NilParamA.test:`,invalid access occurs here]
48
49
codetoanalyze/objc/pulse/uninit.m, Uninit.call_setter_c_struct_bad, 3, PULSE_UNINITIALIZED_VALUE, no_bucket, ERROR, [struct field address `x` created,when calling `Uninit.setS:` here,parameter `s` of Uninit.setS:,read to uninitialized value occurs here]
49
50
codetoanalyze/objc/pulse/use_after_free.m, PulseTest.use_after_free_simple_in_objc_method_bad:, 2, USE_AFTER_FREE, no_bucket, ERROR, [invalidation part of the trace starts here,parameter `x` of PulseTest.use_after_free_simple_in_objc_method_bad:,was invalidated by call to `free()`,use-after-lifetime part of the trace starts here,parameter `x` of PulseTest.use_after_free_simple_in_objc_method_bad:,invalid access occurs here]
50
51
codetoanalyze/objc/pulse/use_after_free.m, use_after_free_simple_bad, 2, USE_AFTER_FREE, no_bucket, ERROR, [invalidation part of the trace starts here,parameter `x` of use_after_free_simple_bad,was invalidated by call to `free()`,use-after-lifetime part of the trace starts here,parameter `x` of use_after_free_simple_bad,invalid access occurs here]
0 commit comments