• Home
  • Raw
  • Download

Lines Matching refs:OSObject

9 struct OSIterator : public OSObject {
13 struct OSArray : public OSObject {
18 OSObject *identity() override;
20 virtual OSObject *generateObject(OSObject *input);
51 OSObject *identity() override;
53 OSObject *generateObject(OSObject *input) override;
57 struct OSSymbol : OSObject {};
68 static void consumedMismatch(OS_CONSUME OSObject *a, in consumedMismatch()
69 OSObject *b) { // expected-note{{Parameter 'b' starts at +0}} in consumedMismatch()
85 bool write_into_out_param_on_success(OS_RETURNS_RETAINED OSObject **obj);
88 OSObject *obj; in use_out_param()
95 OSObject *obj; in use_out_param_leak()
100 bool write_into_out_param_on_failure(OS_RETURNS_RETAINED_ON_ZERO OSObject **obj);
103 OSObject *obj; in use_out_param_leak2()
109 OSObject *obj; in use_out_param_on_failure()
115 IOReturn write_into_out_param_on_nonzero(OS_RETURNS_RETAINED_ON_NONZERO OSObject **obj);
118 OSObject *obj; in use_out_param_on_nonzero()
124 bool write_into_two_out_params(OS_RETURNS_RETAINED OSObject **a,
125 OS_RETURNS_RETAINED OSObject **b);
128 OSObject *obj1; in use_write_into_two_out_params()
129 OSObject *obj2; in use_write_into_two_out_params()
137 OSObject *obj1; in use_write_two_out_params_leak()
138 OSObject *obj2; in use_write_two_out_params_leak()
146 void always_write_into_two_out_params(OS_RETURNS_RETAINED OSObject **a,
147 OS_RETURNS_RETAINED OSObject **b);
150 OSObject *obj1; in use_always_write_into_two_out_params()
151 OSObject *obj2; in use_always_write_into_two_out_params()
158 OSObject *obj1; in use_always_write_into_two_out_params_leak()
159 OSObject *obj2; in use_always_write_into_two_out_params_leak()
167 char *write_into_out_param_on_nonnull(OS_RETURNS_RETAINED OSObject **obj);
170 OSObject *obj; in use_out_param_osreturn_on_nonnull()
177 OSObject *obj; in use_out_param_leak_osreturn_on_nonnull()
182 bool write_optional_out_param(OS_RETURNS_RETAINED OSObject **obj=nullptr);
188 OSReturn write_into_out_param_on_os_success(OS_RETURNS_RETAINED OSObject **obj);
190 void write_into_non_retained_out_param(OS_RETURNS_NOT_RETAINED OSObject **obj);
193 OSObject *obj; in use_write_into_non_retained_out_param()
198 OSObject *obj; in use_write_into_non_retained_out_param_uaf()
204 void always_write_into_out_param(OS_RETURNS_RETAINED OSObject **obj);
206 void pass_through_out_param(OSObject **obj) { in pass_through_out_param()
210 void always_write_into_out_param_has_source(OS_RETURNS_RETAINED OSObject **obj) { in always_write_into_out_param_has_source()
211 …*obj = new OSObject; // expected-note{{Operator 'new' returns an OSObject of type 'OSObject' with … in always_write_into_out_param_has_source()
215 OSObject *obj; in use_always_write_into_out_param_has_source_leak()
222 OSObject *obj; in use_void_out_param_osreturn()
228 OSObject *obj; in use_void_out_param_osreturn_leak()
234 OSObject *obj; in use_out_param_osreturn()
241 OSObject *obj; in use_out_param_leak_osreturn()
246 void cleanup(OSObject **obj);
249 __attribute__((cleanup(cleanup))) OSObject *obj; in test_cleanup_escaping()
254 OSObject *obj;
262 bool os_consume_violation_two_args(OS_CONSUME OSObject *obj, bool extra) { in os_consume_violation_two_args()
271 bool os_consume_violation(OS_CONSUME OSObject *obj) { in os_consume_violation()
280 void os_consume_ok(OS_CONSUME OSObject *obj) { in os_consume_ok()
285OSObject *obj = new OSObject; // expected-note{{Operator 'new' returns an OSObject of type 'OSObje… in use_os_consume_violation()
292OSObject *obj = new OSObject; // expected-note{{Operator 'new' returns an OSObject of type 'OSObje… in use_os_consume_violation_two_args()
299 OSObject *obj = new OSObject; in use_os_consume_ok()
304 OSObject *obj = new OSObject; in test_escaping_into_voidstar()
309 OSObject *obj = new OSObject; in test_escape_has_source()
316 OSObject *input = new OSObject; in test_no_infinite_check_recursion()
317 OSObject *o = arr->generateObject(input); in test_no_infinite_check_recursion()
329 OSObject *other = arr->identity(); in check_attribute_propagation()
337 OSObject *other = arr->identity(); in check_attribute_indirect_propagation()
383 OSObject::getObject(); in check_get_object()
387 OSObject::GetObject(); in check_Get_object()
412 struct ArrayOwner : public OSObject {
487 OSArray *arr = OSDynamicCast(OSArray, OSObject::generateObject(1)); in check_dynamic_cast()
492 OSArray *arr = OSRequiredCast(OSArray, OSObject::generateObject(1)); in check_required_cast()
496 void check_cast_behavior(OSObject *obj) { in check_cast_behavior()
508 unsigned int check_dynamic_cast_no_null_on_orig(OSObject *obj) { in check_dynamic_cast_no_null_on_orig()
520 void check_dynamic_cast_null_branch(OSObject *obj) { in check_dynamic_cast_null_branch()
531 …OSArray *arr = OSDynamicCast(OSArray, OSObject::generateObject(1)); // expected-note{{Call to meth… in check_dynamic_cast_null_check()
612 OSObject *getObject();
613 typedef bool (^Blk)(OSObject *);
619 using OSObjectPtr = os::smart_ptr<OSObject>;
622OSObject *obj = new OSObject; // expected-note{{Operator 'new' returns an OSObject of type 'OSObje… in test_smart_ptr_uaf()
644OSObject *obj = new OSObject; // expected-note{{Operator 'new' returns an OSObject of type 'OSObje… in test_smart_ptr_leak()
664 OSObject *obj = new OSObject; in test_smart_ptr_no_leak()
671 OSObject *getRuleViolation() { in getRuleViolation()
672 return new OSObject; // expected-warning{{Potential leak of an object of type 'OSObject'}} in getRuleViolation()
677 OSObject *createRuleViolation(OSObject *param) { // expected-note{{Parameter 'param' starts at +0}} in createRuleViolation()
689 void escape_elsewhere(OSObject *obj);
692OSObject *obj = new OSObject; // expected-note{{Operator 'new' returns an OSObject of type 'OSObje… in test_free_on_escaped_object_diagnostics()
699 OSObject *obj = new OSObject; in test_tagged_retain_no_leak()
704 OSObject *obj = new OSObject; in test_tagged_retain_no_uaf()
712 OSObject *somethingMatching(OSObject *table = 0);
715 OSObject *testSuppressionForMethodsEndingWithMatching(IOService *svc, in testSuppressionForMethodsEndingWithMatching()
716 OSObject *table = 0) { in testSuppressionForMethodsEndingWithMatching()
719 OSObject *ptr1 = svc->somethingMatching(table); // no-warning in testSuppressionForMethodsEndingWithMatching()
723 OSObject *ptr2 = svc->somethingMatching(); // no-warning in testSuppressionForMethodsEndingWithMatching()
738 WeirdResult outParamWithWeirdResult(OS_RETURNS_RETAINED_ON_ZERO OSObject **obj);
741 OSObject *obj; in testOutParamWithWeirdResult()