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

Errors on API 27 #76

Closed
paulo-raca opened this issue Sep 29, 2018 · 4 comments
Closed

Errors on API 27 #76

paulo-raca opened this issue Sep 29, 2018 · 4 comments

Comments

@paulo-raca
Copy link
Contributor

As we talked on #74, the unit test fail on API 27.

I've confirmed it on x86 and x86_64 emulators, but I didn't test on any arm/arm64 device.

@rk700
Copy link
Member

rk700 commented Sep 29, 2018

I compare the code of both 8.0 and 8.1:

http://androidxref.com/8.0.0_r4/xref/art/runtime/mirror/dex_cache.cc#210
http://androidxref.com/8.1.0_r33/xref/art/runtime/mirror/dex_cache.cc#216

It seems that the cached method array is no longer initialized with the helper trampoline.

Moreover, the cached method array is of type MethodDexCacheType instead of ArtMethod in 8.1, which I didn't realize before.

http://androidxref.com/8.1.0_r33/xref/art/runtime/art_method.h#743
http://androidxref.com/8.0.0_r4/xref/art/runtime/art_method.h#704

I believe that the change in array type leads to the crash.

@rk700
Copy link
Member

rk700 commented Sep 29, 2018

Here's a workaround which might work:

    if(backupMethod) {// do method backup
        if(SDKVersion < ANDROID_O2) {

I've tried on x86 emulator and it works. But not yet for x86_64 and ARM devices which I don't have either.

@paulo-raca
Copy link
Contributor Author

Thanks!

@rk700
Copy link
Member

rk700 commented Dec 20, 2018

This commit 632342d resolves the issue finally.

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

2 participants