-
Notifications
You must be signed in to change notification settings - Fork 288
Changelog r25
Report issues to GitHub.
For Android Studio issues, follow the docs on the Android Studio site.
- Includes Android-T (Tiramisu) Developer Preview 1 APIs.
This is not intended to be a comprehensive list of all outstanding bugs.
-
Issue 360:
thread_localvariables with non-trivial destructors will cause segfaults if the containing library isdlcloseed. This was fixed in API 28, but code running on devices older than API 28 will need a workaround. The simplest fix is to stop callingdlclose. If you absolutely must continue callingdlclose, see the following table:Pre-API 23 APIs 23-27 API 28+ No workarounds Works for static STL Broken Works -Wl,-z,nodeleteWorks for static STL Works Works No dlcloseWorks Works Works If your code must run on devices older than M (API 23) and you cannot use the static STL (common), the only fix is to not call
dlclose, or to stop usingthread_localvariables with non-trivial destructors.If your code does not need to run on devices older than API 23 you can link with
-Wl,-z,nodelete, which instructs the linker to ignoredlclosefor that library. You can backport this behavior by not callingdlclose.The fix in API 28 is the standardized inhibition of
dlclose, so you can backport the fix to older versions by not callingdlclose. -
Issue 988: Exception handling when using ASan via wrap.sh can crash. To workaround this issue when using libc++_shared, ensure that your application's libc++_shared.so is in
LD_PRELOADin yourwrap.shas in the following example:#!/system/bin/sh HERE="$(cd "$(dirname "$0")" && pwd)" export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1 ASAN_LIB=$(ls $HERE/libclang_rt.asan-*-android.so) if [ -f "$HERE/libc++_shared.so" ]; then # Workaround for https://github.com/android/ndk/issues/988. export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so" else export LD_PRELOAD="$ASAN_LIB" fi "$@"
There is no known workaround for libc++_static.
Note that because this is a platform bug rather than an NDK bug this cannot be fixed with an NDK update. This workaround will be necessary for code running on devices that do not contain the fix, and the bug has not been fixed even in the latest release of Android.