From be677702019f7aa6f7fc222c575ce739be79ccf8 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 1 Jul 2019 12:34:59 -0700 Subject: [PATCH] Add Issue 988 to the KI list in the changelogs. Test: None Bug: https://github.com/android-ndk/ndk/issues/988 Change-Id: I2946e2190c95e4b0088d8db9025d803ab6f84ed9 --- docs/changelogs/Changelog-r19.md | 17 +++++++++++++++++ docs/changelogs/Changelog-r20.md | 17 +++++++++++++++++ docs/changelogs/Changelog-r21.md | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/docs/changelogs/Changelog-r19.md b/docs/changelogs/Changelog-r19.md index b752e53b6..c4c2018fa 100644 --- a/docs/changelogs/Changelog-r19.md +++ b/docs/changelogs/Changelog-r19.md @@ -156,6 +156,22 @@ Known Issues `-march=armv7-a` when building for 32-bit ARM with the non-integrated assembler, or use the integrated assembler. ndk-build and CMake already contain these workarounds. + * [Issue 988]: Exception handling with libc++_shared when using ASan via + wrap.sh can crash. To workaround this issue, ensure that your application's + libc++_shared.so is in `LD_PRELOAD` in your `wrap.sh` as in the following + example: + + ```bash + #!/system/bin/sh + HERE="$(cd "$(dirname "$0")" && pwd)" + export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1 + export LD_PRELOAD="$HERE/libclang_rt.asan-aarch64-android.so $HERE/libc++_shared.so" + exec "$@" + ``` + + Note that because this is a platform bug rather than an NDK bug this + workaround will be necessary for this use case to work on all devices until + at least Android R. * This version of the NDK is incompatible with the Android Gradle plugin version 3.0 or older. If you see an error like `No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`, @@ -168,4 +184,5 @@ Known Issues [Issue 884]: https://github.com/android-ndk/ndk/issues/884 [Issue 888]: https://github.com/android-ndk/ndk/issues/888 [Issue 906]: https://github.com/android-ndk/ndk/issues/906 +[Issue 988]: https://github.com/android-ndk/ndk/issues/988 [use plugin version 3.1 or newer]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin diff --git a/docs/changelogs/Changelog-r20.md b/docs/changelogs/Changelog-r20.md index 907a35a62..d497ff26e 100644 --- a/docs/changelogs/Changelog-r20.md +++ b/docs/changelogs/Changelog-r20.md @@ -52,6 +52,22 @@ For Android Studio issues, follow the docs on the [Android Studio site]. `-march=armv7-a` when building for 32-bit ARM with the non-integrated assembler, or use the integrated assembler. ndk-build and CMake already contain these workarounds. + * [Issue 988]: Exception handling with libc++_shared when using ASan via + wrap.sh can crash. To workaround this issue, ensure that your application's + libc++_shared.so is in `LD_PRELOAD` in your `wrap.sh` as in the following + example: + + ```bash + #!/system/bin/sh + HERE="$(cd "$(dirname "$0")" && pwd)" + export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1 + export LD_PRELOAD="$HERE/libclang_rt.asan-aarch64-android.so $HERE/libc++_shared.so" + exec "$@" + ``` + + Note that because this is a platform bug rather than an NDK bug this + workaround will be necessary for this use case to work on all devices until + at least Android R. * [Issue 1004]: Clang outputs debug info with bad line number info when compiling for ARM64 and `-O0` (no optimizations). Third-party build systems can pass `-fno-experimental-isel` to Clang to work around this issue. @@ -67,5 +83,6 @@ For Android Studio issues, follow the docs on the [Android Studio site]. [Issue 884]: https://github.com/android-ndk/ndk/issues/884 [Issue 888]: https://github.com/android-ndk/ndk/issues/888 [Issue 906]: https://github.com/android-ndk/ndk/issues/906 +[Issue 988]: https://github.com/android-ndk/ndk/issues/988 [Issue 1004]: https://github.com/android-ndk/ndk/issues/1004 [use plugin version 3.1 or newer]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin diff --git a/docs/changelogs/Changelog-r21.md b/docs/changelogs/Changelog-r21.md index a671b2787..a3f4a576a 100644 --- a/docs/changelogs/Changelog-r21.md +++ b/docs/changelogs/Changelog-r21.md @@ -55,6 +55,22 @@ For Android Studio issues, follow the docs on the [Android Studio site]. `-march=armv7-a` when building for 32-bit ARM with the non-integrated assembler, or use the integrated assembler. ndk-build and CMake already contain these workarounds. + * [Issue 988]: Exception handling with libc++_shared when using ASan via + wrap.sh can crash. To workaround this issue, ensure that your application's + libc++_shared.so is in `LD_PRELOAD` in your `wrap.sh` as in the following + example: + + ```bash + #!/system/bin/sh + HERE="$(cd "$(dirname "$0")" && pwd)" + export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1 + export LD_PRELOAD="$HERE/libclang_rt.asan-aarch64-android.so $HERE/libc++_shared.so" + exec "$@" + ``` + + Note that because this is a platform bug rather than an NDK bug this + workaround will be necessary for this use case to work on all devices until + at least Android R. * [Issue 1004]: Clang outputs debug info with bad line number info when compiling for ARM64 and `-O0` (no optimizations). Third-party build systems can pass `-fno-experimental-isel` to Clang to work around this issue. @@ -69,5 +85,6 @@ For Android Studio issues, follow the docs on the [Android Studio site]. [Issue 855]: https://github.com/android-ndk/ndk/issues/855 [Issue 884]: https://github.com/android-ndk/ndk/issues/884 [Issue 906]: https://github.com/android-ndk/ndk/issues/906 +[Issue 988]: https://github.com/android-ndk/ndk/issues/988 [Issue 1004]: https://github.com/android-ndk/ndk/issues/1004 [use plugin version 3.1 or newer]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin