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

Android 15 16kb Pages #2464

Closed
soundlicious opened this issue Oct 3, 2024 · 5 comments
Closed

Android 15 16kb Pages #2464

soundlicious opened this issue Oct 3, 2024 · 5 comments
Assignees

Comments

@soundlicious
Copy link

With Android 15, users can now choose to activate the 16kb pages on arm64 devices.
Natives libraries need to support this to avoid crashes.

Can a new Android release be made with those changes ?

@wantehchang
Copy link
Collaborator

@jzern FYI.

Vignesh: you take a look at this request?

I don't remember any libavif code that uses the page size such as calls to the mmap() system call. So I don't think we need to modify the libavif code. I wonder if we need to pass the -Wl,-z,max-page-size=16384 linker flag.

@soundlicious
Copy link
Author

soundlicious commented Oct 3, 2024

@wantehchang @jzern @vigneshvg
Someone might have made a fork with the alignment according to this issue in Glide repo

@jzern
Copy link
Collaborator

jzern commented Oct 3, 2024

The r27 Changelog provides details.

@vigneshvg
Copy link
Collaborator

I can reproduce this bug with a local build using CMake (the fix is to include the linker flag ''Wl,-z,max-page-size=16384" ).

However, the maven hosted version does not seem to have this issue and is already aligned properly (it is generated by internal google build tools and not CMake).

vigneshvg added a commit to vigneshvg/libavif that referenced this issue Nov 19, 2024
Add -Wl,-z,max-page-size=16384 linker flag when building the JNI
wrapper to support newly added 16kb page size on Android.

https://developer.android.com/guide/practices/page-sizes#cmake

Fixes issue AOMediaCodec#2464
vigneshvg added a commit that referenced this issue Nov 19, 2024
Add -Wl,-z,max-page-size=16384 linker flag when building the JNI
wrapper to support newly added 16kb page size on Android.

https://developer.android.com/guide/practices/page-sizes#cmake

Fixes issue #2464
@vigneshvg
Copy link
Collaborator

The issue has been fixed with CMake builds.

The maven release with tag '1.1.1.14d8e3c4' works on devices with 16kb pages as well.

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

4 participants