ArtHook icon indicating copy to clipboard operation
ArtHook copied to clipboard

Question regarding getQuickCompiledCodeSize

Open AeonLucid opened this issue 4 years ago • 0 comments

I read your thesis and was trying to port your method to the modern Android SDK. However I was having issues porting over getQuickCompiledCodeSize. It returns normal values on SDK 23 but has been broken since SDK 24. It reads garbage data. Because of that, I was wondering how you even added support for SDK 24 - 26, was it untested?

Also, is this what the code tries to do?
This is from Android 6 source code art\runtime\art_method-inl.h.

inline uint32_t ArtMethod::GetCodeSize(const void* code) {
  if (code == nullptr) {
    return 0u;
  }
  return reinterpret_cast<const OatQuickMethodHeader*>(code)[-1].code_size_;
}

AeonLucid avatar Nov 26 '19 00:11 AeonLucid