Skip to content
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

method循环调用 #70

Open
w5678912345 opened this issue May 25, 2016 · 3 comments
Open

method循环调用 #70

w5678912345 opened this issue May 25, 2016 · 3 comments

Comments

@w5678912345
Copy link

hi,你好,我在使用dexposed在art中的时候出现了循环调用的现象。
在hook完之后
正常的调用逻辑应该是:before -> original -> after
但是当我调用如下函数的时候,又会hook住。
com_taobao_android_dexposed_DexposedBridge_invokeOriginalMethodNative

最终变成了这样: before -> original -> before -> original .... ....
请问这个是目前已知的问题么?

@kplong
Copy link

kplong commented Jul 19, 2016

最终怎么解决的,我这边也出现这个问题了

@w5678912345
Copy link
Author

  // Create a backup of the ArtMethod object
  ArtMethod* backup_method = down_cast<ArtMethod*>(art_method->Clone(soa.Self()));
  // Set private flag to avoid virtual table lookups during invocation
  **backup_method->SetAccessFlags(backup_method->GetAccessFlags() /*| kAccXposedOriginalMethod*/);**

参照xposed对backup_mothod的修改
*backup_method->SetAccessFlags(backup_method->GetAccessFlags() | kAccPrivate /* | kAccXposedOriginalMethod /);

@hwjump
Copy link
Contributor

hwjump commented Mar 29, 2017

I change the hook core for art, you can refer the dev_art branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants