-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with hooking NSURL #14
Comments
感觉这种用法还是蛮常见的,试了一下确实会崩溃。 |
我周末看下,不知道其他hook方式会不会产生类似的问题 |
试了下 Aspects 也有问题 |
[NSURL st_hookInstanceMethod:@selector(absoluteString) option:(STOptionBefore) usingIdentifier:@"123" withBlock:^(id params) {
|
对NSURL的实例hook之后,该实例任何方法都会crash,甚至release都crash了,从汇编堆栈看起来是cache对象野了。
|
目测是 NSURL 重写了 retain() & release(), 里面判断了和类相关的内容,重写后导致release时走了 [super release]释放了引用计数。
|
The text was updated successfully, but these errors were encountered: