Re: [cfe-commits] [PATCH] WIP: catch CFMakeCollectable(NULL) with static analyzer

2012-11-07 Thread Jordan Rose
Committed in r167537. Thanks, Sean!

Jordan


On Nov 5, 2012, at 18:32 , Sean McBride s...@rogue-research.com wrote:

 Jordan,
 
 Updated patch attached.
 
 Thanks,
 
 Sean
 
 
 On Fri, 2 Nov 2012 09:49:37 -0700, Jordan Rose said:
 
 Hi, Sean. Thanks for the patch!
 
 Most of the tests in retain-release.m are just top-level functions,
 numbered numerically from lack of imagination. The arguments are fairly
 arbitrary—'p' is just 'pointer' (I think), and 'x' is being used as a
 sort of coin toss to arbitrarily create conditions where the analyzer
 considers both branches equally likely.
 
 The actual patch itself looks good, except I'd stick an
 'llvm_unreachable' in a last 'else' case for that chained if-statement.
 
 Your test output is fine; if something broke it would say Unexpected
 Failures and probably print output from that test as well.
 
 Once you've updated the patch, please send it back to the list!
 Jordan
 CFMakeCollectable-with-null2.patch


___
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


Re: [cfe-commits] [PATCH] WIP: catch CFMakeCollectable(NULL) with static analyzer

2012-11-05 Thread Sean McBride
Jordan,

Updated patch attached.

Thanks,

Sean


On Fri, 2 Nov 2012 09:49:37 -0700, Jordan Rose said:

Hi, Sean. Thanks for the patch!

Most of the tests in retain-release.m are just top-level functions,
numbered numerically from lack of imagination. The arguments are fairly
arbitrary—'p' is just 'pointer' (I think), and 'x' is being used as a
sort of coin toss to arbitrarily create conditions where the analyzer
considers both branches equally likely.

The actual patch itself looks good, except I'd stick an
'llvm_unreachable' in a last 'else' case for that chained if-statement.

Your test output is fine; if something broke it would say Unexpected
Failures and probably print output from that test as well.

Once you've updated the patch, please send it back to the list!
Jordan


CFMakeCollectable-with-null2.patch
Description: Binary data
___
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


Re: [cfe-commits] [PATCH] WIP: catch CFMakeCollectable(NULL) with static analyzer

2012-11-02 Thread Jordan Rose
Hi, Sean. Thanks for the patch!

Most of the tests in retain-release.m are just top-level functions, numbered 
numerically from lack of imagination. The arguments are fairly arbitrary—'p' is 
just 'pointer' (I think), and 'x' is being used as a sort of coin toss to 
arbitrarily create conditions where the analyzer considers both branches 
equally likely.

The actual patch itself looks good, except I'd stick an 'llvm_unreachable' in a 
last 'else' case for that chained if-statement.

Your test output is fine; if something broke it would say Unexpected Failures 
and probably print output from that test as well.

Once you've updated the patch, please send it back to the list!
Jordan


On Nov 1, 2012, at 12:17 , Sean McBride s...@rogue-research.com wrote:

 Hi all,
 
 Attached is a patch that expands the analyzer's check for CFRelease(NULL) to 
 also catch CFMakeCollectable(NULL).
 
 It builds, and the resulting clang does now warn on CFMakeCollectable(NULL), 
 but I have not added a test.  I'm pretty sure the test belongs in 
 retain-release.m in f16() and f17(), but don't see who calls them, what their 
 parameters mean, or what their names mean.
 
 I ran the test suite:
 
 $ make check-clang
 
 [100%] Running the Clang regression tests
 lit.py: lit.cfg:171: note: using clang: 
 '/Users/smcbride/Documents/Development/llvm-bin/bin/./clang'
 Testing Time: 169.28s
  Expected Passes: 5511
  Expected Failures  : 24
  Unsupported Tests  : 5
 [100%] Built target check-clang
 
 Not sure what output I should see... I guess this indicates nothing got 
 broken?
 
 Thanks,
 
 --
 
 Sean McBride, B. Eng s...@rogue-research.com
 Rogue Researchwww.rogue-research.com
 Mac Software Developer  Montréal, Québec, Canada
 CFMakeCollectable-with-null.patch___
 cfe-commits mailing list
 cfe-commits@cs.uiuc.edu
 http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


___
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


[cfe-commits] [PATCH] WIP: catch CFMakeCollectable(NULL) with static analyzer

2012-11-01 Thread Sean McBride
Hi all,

Attached is a patch that expands the analyzer's check for CFRelease(NULL) to 
also catch CFMakeCollectable(NULL).

It builds, and the resulting clang does now warn on CFMakeCollectable(NULL), 
but I have not added a test.  I'm pretty sure the test belongs in 
retain-release.m in f16() and f17(), but don't see who calls them, what their 
parameters mean, or what their names mean.

I ran the test suite:

$ make check-clang

[100%] Running the Clang regression tests
lit.py: lit.cfg:171: note: using clang: 
'/Users/smcbride/Documents/Development/llvm-bin/bin/./clang'
Testing Time: 169.28s
  Expected Passes: 5511
  Expected Failures  : 24
  Unsupported Tests  : 5
[100%] Built target check-clang

Not sure what output I should see... I guess this indicates nothing got broken?

Thanks,

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada


CFMakeCollectable-with-null.patch
Description: Binary data
___
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits