diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 01:09:54 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 01:09:54 +0000 |
commit | ff67535f3369c89f99bd12fae4e6f3237ab1cf47 (patch) | |
tree | 43d2409e6d7fabdc18709056f84e577c009fe2a9 /build | |
parent | ef6e6d61a46227bc34d05a371ada5905d1f5c9c9 (diff) | |
download | chromium_src-ff67535f3369c89f99bd12fae4e6f3237ab1cf47.zip chromium_src-ff67535f3369c89f99bd12fae4e6f3237ab1cf47.tar.gz chromium_src-ff67535f3369c89f99bd12fae4e6f3237ab1cf47.tar.bz2 |
Check and warn if public destructors are found on types that derive from base::RefCounted or base::RefCountedThreadSafe.
Having public destructors is dangerous, as it allows the ref-counted object to be stack allocated and have references that attempt to outlive the stack, or to allow callers to explicitly delete it while references are still held. Both patterns result in use-after-free, hence their prohibition.
In doing so, update the Chromium plugin to be able to scan both headers and implementation files, and enable the public destructor check for both types with an optional flag ( -Xclang -plugin-arg-find-bad-constructs -Xclang skip-refcounted-dtors )
BUG=123295
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10005022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
0 files changed, 0 insertions, 0 deletions