Skip to content

Conversation

@ygdrasil-io
Copy link
Contributor

Current CI/CD create binary with 4kb memory page size alignment, Android required now a 16kb alignment.
https://developer.android.com/guide/practices/page-sizes

% $ANDROID_HOME/ndk/29.0.14206865/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-objdump -p ./libwgpu_native.so | grep LOAD
    LOAD off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12
    LOAD off    0x00000000001da4ec vaddr 0x00000000001db4ec paddr 0x00000000001db4ec align 2**12
    LOAD off    0x0000000000675210 vaddr 0x0000000000677210 paddr 0x0000000000677210 align 2**12
    LOAD off    0x00000000006c0598 vaddr 0x00000000006c3598 paddr 0x00000000006c3598 align 2**12

Switching to latest ndk should to the trick, at least on the binary generation. There may be more work on Rust memory allocation side.

@ygdrasil-io
Copy link
Contributor Author

If anyone wants to test, I created this build: https://github.com/ygdrasil-io/wgpu-native/releases/tag/v27.0.4.0.
From what I could test, library loading no longer crashes with the 16kb mode emulator, and there is no impact on the 4kb mode.

@cwfitzgerald, could you merge and create a release, please?

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

Successfully merging this pull request may close these issues.

1 participant