yunyyyun / WildPointerChecker

check wild pointer crash in iOS App. inspiration from zombie object.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WildPointerChecker

check wild pointer crash in iOS App. inspiration from zombie object.

How to work

  • use fishhook(facebook) lib hook the C method free
  • in my free method add the pointer to a unfree list
  • when the memory is out off limit, free some
  • copy WPCZombieObject Class to the free memory
  • rewrite WPCZombieObject's forwardingTargetForSelector to catch the selector

Usage

  • #import "WildPointerChecker/WildPointerChecker.h" in your .m
  • call startWildPointerCheck() anywhere to start, you'd better not call twice.
  • call stopWildPointerCheck() anywhere to stop

About

check wild pointer crash in iOS App. inspiration from zombie object.

License:GNU General Public License v3.0


Languages

Language:Objective-C 51.5%Language:C 48.5%