[PATCH] D17528: [analyzer] Warn on use of 'self' after call to to [super dealloc].

Devin Coughlin via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 22 15:47:10 PST 2016


dcoughlin created this revision.
dcoughlin added a reviewer: zaks.anna.
dcoughlin added a subscriber: cfe-commits.

Referring to 'self' after  a call to [super dealloc] is a use-after-free in Objective-C because NSObject's -dealloc frees the memory pointed to by self. This patch extends the ObjCSuperDeallocChecker to catch this error.

rdar://problem/6953275



http://reviews.llvm.org/D17528

Files:
  lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp
  test/Analysis/DeallocUseAfterFreeErrors.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17528.48747.patch
Type: text/x-patch
Size: 10712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160222/06948203/attachment.bin>


More information about the cfe-commits mailing list