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

UpdateMethodsCode of Instrumentation crash #10

Closed
buffcow opened this issue Mar 14, 2022 · 11 comments
Closed

UpdateMethodsCode of Instrumentation crash #10

buffcow opened this issue Mar 14, 2022 · 11 comments
Labels
invalid This doesn't seem right

Comments

@buffcow
Copy link

buffcow commented Mar 14, 2022

app crash when I use lsplant to hook method.
device is android 9.0
is a bug ? @yujincheng08
🥺

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'xiaomi/wayne/wayne:9/PKQ1.180904.001/20.3.26:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 23608, tid: 23608, name: m.comeback.data  >>> com.comeback.data <<<
signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xe98fd43c
    r0  ed99a608  r1  e9f8ce40  r2  e9b51ae1  r3  ec033039
    r4  0000ffff  r5  e9f8ce40  r6  ffdebae0  r7  00000001
    r8  ed99a608  r9  e9b51ae1  r10 12d0da68  r11 12d0da38
    ip  e9b51ae1  sp  ffdebaa8  lr  e981f581  pc  e98fd43c

backtrace:
    #00 pc 001be43c  /system/lib/libart.so (offset 0x1b2000) (art::instrumentation::Instrumentation::UpdateMethodsCodeForJavaDebuggable(art::ArtMethod*, void const*)+28)
    #01 pc 01f3bffd  /dev/ashmem/dalvik-data-code-cache (deleted)

stack:
         ffdeba68  00000001
         ffdeba6c  ccda3c68  [anon:.bss]
         ffdeba70  e9f8ce40  /dev/ashmem/dalvik-LinearAlloc (deleted)
         ffdeba74  ccda6330  [anon:.bss]
         ffdeba78  e9f8ce40  /dev/ashmem/dalvik-LinearAlloc (deleted)
         ffdeba7c  ccde2460  [anon:.bss]
         ffdeba80  e9b51a01  /system/lib/libart.so (art_quick_resolution_trampoline+32)
         ffdeba84  e9f8ce40  /dev/ashmem/dalvik-LinearAlloc (deleted)
         ffdeba88  e9b51ae1  /system/lib/libart.so (art_quick_to_interpreter_bridge)
         ffdeba8c  ed99a608  [anon:libc_malloc]
         ffdeba90  12d0da38  /dev/ashmem/dalvik-main space (region space) (deleted)
         ffdeba94  ccda641c  [anon:.bss]
         ffdeba98  0000ffff
         ffdeba9c  e9f8ce40  /dev/ashmem/dalvik-LinearAlloc (deleted)
         ffdebaa0  12d0da38  /dev/ashmem/dalvik-main space (region space) (deleted)
         ffdebaa4  e981f581  /system/lib/libart.so (_ZN3art11ClassLinker22FixupStaticTrampolinesENS_6ObjPtrINS_6mirror5ClassEEE+568)
    #00  ffdebaa8  00000000
         ........  ........
    #01  ffdebab8  e9b51a51  /system/lib/libart.so (art_quick_generic_jni_trampoline)
         ffdebabc  ed9dd180  [anon:libc_malloc]
         ffdebac0  00000000
         ffdebac4  00000000
         ffdebac8  ed9df580  [anon:libc_malloc]
         ffdebacc  9ff3ad0e
         ffdebad0  00000002
         ffdebad4  00000000
         ffdebad8  00000000
         ffdebadc  019f868f
         ffdebae0  00000001
         ffdebae4  00000000
         ffdebae8  00000014
         ffdebaec  00000000
         ffdebaf0  00000020
         ffdebaf4  00000009
@yujincheng08
Copy link
Member

yujincheng08 commented Mar 14, 2022

which version are you using?

@buffcow
Copy link
Author

buffcow commented Mar 14, 2022

whichversion are you using.

master, the lasted version
It's a static library that I compile myself and then put into my project for static linking.
I execute the command ./gradlew lsplant:configureCMakeRelWithDebInfo in the directory of the project.
then use ninja to build the static library

i build the library before this commit
and then crash too

@yujincheng08
Copy link
Member

build the lastest commit.

@buffcow
Copy link
Author

buffcow commented Mar 14, 2022

build the lastest commit.

y I was already building the latest commit, but it crashed.

@yujincheng08
Copy link
Member

No. The latest commit won't hook upateMethodsCode anymore. So you are not using the latest commit.

@buffcow
Copy link
Author

buffcow commented Mar 14, 2022

No. The latest commit won't hook upateMethodsCode anymore. So you are not using the latest commit.

i know, But it's the same problem, except that the error is from _ZN3art11ClassLinker22FixupStaticTrampolinesENS_6ObjPtrINS_6mirror5ClassEEE

@yujincheng08
Copy link
Member

yujincheng08 commented Mar 14, 2022

I don't trust your words.

@vvb2060
Copy link
Member

vvb2060 commented Mar 14, 2022

It's a static library that I compile myself and then put into my project for static linking.

The license for this project is LGPL-3.0, where is your source code?

@buffcow
Copy link
Author

buffcow commented Mar 14, 2022

It's a static library that I compile myself and then put into my project for static linking.

The license for this project is LGPL-3.0, where is your source code?

Is used in my own personal research project

@yujincheng08
Copy link
Member

  1. No log or source
  2. UpdateMethodsCodeForJavaDebuggable won't be called by FixupStaticTrampolines
  3. UpdateMethodsCodeForJavaDebuggable won't be called in the normal case unless you attach a debugger, which is not supported.
  4. From your stack I cannot see FixupStaticTrampolines is hooked
  5. ILL_ILLOPC is most likely caused by your native inline hook
  6. All unit tests pass from Android 5.0 up to Tiramisu: https://github.com/LSPosed/LSPlant/actions/runs/1976841600

@buffcow
Copy link
Author

buffcow commented Mar 14, 2022

  1. No log or source
  2. UpdateMethodsCodeForJavaDebuggable won't be called by FixupStaticTrampolines
  3. UpdateMethodsCodeForJavaDebuggable won't be called in the normal case unless you attach a debugger, which is not supported.
  4. From your stack I cannot see FixupStaticTrampolines is hooked
  5. ILL_ILLOPC is most likely caused by your native inline hook
  6. All unit tests pass from Android 5.0 up to Tiramisu: https://github.com/LSPosed/LSPlant/actions/runs/1976841600

ok sorry, it should be my own question, thank you very much

@yujincheng08 yujincheng08 added the invalid This doesn't seem right label Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants