// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -fblocks -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s // RUN: FileCheck --input-file %t %s void test_null_init(void) { int *p = 0; *p = 0xDEADBEEF; } void test_null_assign(void) { int *p; p = 0; *p = 0xDEADBEEF; } void test_null_assign_transitive(void) { int *p; p = 0; int *q = p; *q = 0xDEADBEEF; } void test_null_cond(int *p) { if (!p) { *p = 0xDEADBEEF; } } void test_null_cond_transitive(int *q) { if (!q) { int *p = q; *p = 0xDEADBEEF; } } void test_null_field(void) { struct s { int *p; } x; x.p = 0; *(x.p) = 0xDEADBEEF; } // leak reports should not show paths that end with exit() (but ones that don't end with exit()) void panic() __attribute__((noreturn)); enum { kCFNumberSInt8Type = 1, kCFNumberSInt16Type = 2, kCFNumberSInt32Type = 3, kCFNumberSInt64Type = 4, kCFNumberFloat32Type = 5, kCFNumberFloat64Type = 6, kCFNumberCharType = 7, kCFNumberShortType = 8, kCFNumberIntType = 9, kCFNumberLongType = 10, kCFNumberLongLongType = 11, kCFNumberFloatType = 12, kCFNumberDoubleType = 13, kCFNumberCFIndexType = 14, kCFNumberNSIntegerType = 15, kCFNumberCGFloatType = 16, kCFNumberMaxType = 16 }; typedef const struct __CFAllocator * CFAllocatorRef; extern const CFAllocatorRef kCFAllocatorDefault; typedef signed long CFIndex; typedef CFIndex CFNumberType; typedef const struct __CFNumber * CFNumberRef; extern CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, const void *valuePtr); void rdar8331641(int x) { signed z = 1; CFNumberRef value = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &z); // expected-warning{{leak}} if (x) panic(); (void) value; } // CHECK: diagnostics // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line5 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line5 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line5 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: 'p' initialized to a null pointer value // CHECK-NEXT: message // CHECK-NEXT: 'p' initialized to a null pointer value // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line5 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line5 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line6 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line6 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line6 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line6 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line6 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'p') // CHECK-NEXT: categoryLogic error // CHECK-NEXT: typeDereference of null pointer // CHECK-NEXT: check_namecore.NullDereference // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_null_init // CHECK-NEXT: issue_hash2 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line6 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line10 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line10 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Null pointer value stored to 'p' // CHECK-NEXT: message // CHECK-NEXT: Null pointer value stored to 'p' // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line12 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line12 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line12 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line12 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line12 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'p') // CHECK-NEXT: categoryLogic error // CHECK-NEXT: typeDereference of null pointer // CHECK-NEXT: check_namecore.NullDereference // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_null_assign // CHECK-NEXT: issue_hash3 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line12 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line16 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line16 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line17 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line17 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line17 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line17 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line17 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Null pointer value stored to 'p' // CHECK-NEXT: message // CHECK-NEXT: Null pointer value stored to 'p' // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line17 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line17 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line18 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line18 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line18 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line18 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line18 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: 'q' initialized to a null pointer value // CHECK-NEXT: message // CHECK-NEXT: 'q' initialized to a null pointer value // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line18 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line18 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line19 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line19 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line19 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line19 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line19 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'q') // CHECK-NEXT: message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'q') // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'q') // CHECK-NEXT: categoryLogic error // CHECK-NEXT: typeDereference of null pointer // CHECK-NEXT: check_namecore.NullDereference // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_null_assign_transitive // CHECK-NEXT: issue_hash4 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line19 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Assuming 'p' is null // CHECK-NEXT: message // CHECK-NEXT: Assuming 'p' is null // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line23 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'p') // CHECK-NEXT: categoryLogic error // CHECK-NEXT: typeDereference of null pointer // CHECK-NEXT: check_namecore.NullDereference // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_null_cond // CHECK-NEXT: issue_hash2 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line24 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Assuming 'q' is null // CHECK-NEXT: message // CHECK-NEXT: Assuming 'q' is null // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line29 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line30 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line30 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line30 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line30 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line30 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: 'p' initialized to a null pointer value // CHECK-NEXT: message // CHECK-NEXT: 'p' initialized to a null pointer value // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line30 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line30 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line31 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line31 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line31 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line31 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line31 // CHECK-NEXT: col6 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: message // CHECK-NEXT: Dereference of null pointer (loaded from variable 'p') // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'p') // CHECK-NEXT: categoryLogic error // CHECK-NEXT: typeDereference of null pointer // CHECK-NEXT: check_namecore.NullDereference // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_null_cond_transitive // CHECK-NEXT: issue_hash3 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line31 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line36 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line36 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line36 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line36 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line36 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line36 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line37 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line37 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line37 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line37 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line37 // CHECK-NEXT: col9 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Null pointer value stored to 'x.p' // CHECK-NEXT: message // CHECK-NEXT: Null pointer value stored to 'x.p' // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line37 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line37 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line38 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line38 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line38 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line38 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line38 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Dereference of null pointer (loaded from field 'p') // CHECK-NEXT: message // CHECK-NEXT: Dereference of null pointer (loaded from field 'p') // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionDereference of null pointer (loaded from field 'p') // CHECK-NEXT: categoryLogic error // CHECK-NEXT: typeDereference of null pointer // CHECK-NEXT: check_namecore.NullDereference // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_null_field // CHECK-NEXT: issue_hash3 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line38 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line53 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line53 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col13 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col13 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col23 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col36 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col23 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col23 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col82 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Call to function 'CFNumberCreate' returns a Core Foundation object with a +1 retain count // CHECK-NEXT: message // CHECK-NEXT: Call to function 'CFNumberCreate' returns a Core Foundation object with a +1 retain count // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col23 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line54 // CHECK-NEXT: col36 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col4 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Assuming 'x' is 0 // CHECK-NEXT: message // CHECK-NEXT: Assuming 'x' is 0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line55 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line57 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line57 // CHECK-NEXT: col14 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line57 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line57 // CHECK-NEXT: col14 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line58 // CHECK-NEXT: col1 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line58 // CHECK-NEXT: col1 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line58 // CHECK-NEXT: col1 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Object leaked: object allocated and stored into 'value' is not referenced later in this execution path and has a retain count of +1 // CHECK-NEXT: message // CHECK-NEXT: Object leaked: object allocated and stored into 'value' is not referenced later in this execution path and has a retain count of +1 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionPotential leak of an object stored into 'value' // CHECK-NEXT: categoryMemory (Core Foundation/Objective-C) // CHECK-NEXT: typeLeak // CHECK-NEXT: check_nameosx.cocoa.RetainCount // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contextrdar8331641 // CHECK-NEXT: issue_hash2 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line58 // CHECK-NEXT: col1 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: