cossacklabs / themis

Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.
https://www.cossacklabs.com/themis
Apache License 2.0
1.88k stars 143 forks source link

Themis Android crashes on devices with 16 KB page size #1050

Closed lehandriel closed 2 months ago

lehandriel commented 3 months ago

Describe the bug Themis Android crashes on devices with 16 KB page size.

To Reproduce Steps to reproduce the behavior:

  1. Create a virtual device with Android 15 and 16KB page size
  2. Run docs/examples/android app on the created virtual device
  3. App crashes

Expected behavior App runs without a crash

Environment (please complete the following information):

Additional context According to https://developer.android.com/guide/practices/page-sizes#compile-r26-lower a line:

target_link_options(themis_jni PRIVATE "-Wl,-z,max-page-size=16384")

should be added to the file:

jni/CMakeLists.txt
vixentael commented 3 months ago

oh wow thank you @lehandriel We will take a look and update CMakeLists and try to repack the build

lehandriel commented 3 months ago

i've prepared a potential pr bases on google requirements: https://github.com/cossacklabs/themis/pull/1051

lehandriel commented 3 months ago

@vixentael do you plan to release a new version of themis-android containing this fix any time soon? :)

radetsky commented 2 months ago

We updated themis-android on GitHub and in the Maven repository. You may try to set dependency as

implementation 'com.cossacklabs.com:themis:0.15.5'
vixentael commented 2 months ago

@lehandriel please try the updated Themis and let us know if it works for you!

lehandriel commented 2 months ago

@radetsky @vixentael works like a charm 👍 thanks! 🙂

vixentael commented 2 months ago

thank you @lehandriel for opening an issue and suggesting a fix! thank you @radetsky for checking the fix, updating the example app, and releasing the updated Themis lib