Bug #1107
closedStandalone executables built with CrystaX 10.2.1 crash on Marshmallow
100%
Description
When building standalone executables with Crystax 10.2.1 and running these on an Android Marshmallow (API 23) emulator, they crash after the main() method returns. There's always one of two messages (non-deterministic):
Invalid address 0xb6eead84 passed to free: value not allocated Aborted
or
Segmentation fault
Here's my test program:
int main(int argc, char **argv) {}
I tested all combinations of the following:
- NDKs: Google, CrystaX
- Compilers: gcc 4.8, gcc 4.9, clang 3.5, clang3.6
- Archs: armv7-a, x86
- STLs: gnustl, libcxx
- Android emulator APIs: 22, 23
All tests with Google's NDK or with Android 22 were fine, but all tests combining CrystaX and Android 23 showed the error.
I added my test scripts as an attachment. You use them as follows:
- extract CrystaX NDK and the official Android NDK to /opt/crystax-ndk and /opt/android-ndk
- change to the testproject dir from my tarball
- ./make-toolchains.sh # this takes around 12 GB of space!
- ./buildall.sh
- start an emulator (armv7-a or x86)
- adb push PATH_TO_LIB/libcrystax.so /data/local/tmp
- ./runall.sh x86 # or ./runall.sh armeabi-v7a
You will get the following output for API 23 x86:
minimal-android-x86-4.8-gnustl 141 KB/s (6060 bytes in 0.041s) Success minimal-android-x86-4.8-libcxx 140 KB/s (6060 bytes in 0.042s) Success minimal-android-x86-4.9-gnustl 143 KB/s (6100 bytes in 0.041s) Success minimal-android-x86-4.9-libcxx 142 KB/s (6100 bytes in 0.041s) Success minimal-android-x86-clang3.5-gnustl 141 KB/s (6060 bytes in 0.041s) Success minimal-android-x86-clang3.5-libcxx 141 KB/s (6060 bytes in 0.041s) Success minimal-android-x86-clang3.6-gnustl 140 KB/s (6060 bytes in 0.042s) Success minimal-android-x86-clang3.6-libcxx 138 KB/s (6060 bytes in 0.042s) Success minimal-crystax-x86-4.8-gnustl 140 KB/s (6024 bytes in 0.042s) Invalid address 0xb7647480 passed to free: value not allocated Aborted Failed minimal-crystax-x86-4.8-libcxx 139 KB/s (6024 bytes in 0.042s) Invalid address 0xb768d480 passed to free: value not allocated Aborted Failed minimal-crystax-x86-4.9-gnustl 142 KB/s (6008 bytes in 0.041s) Invalid address 0xb75d0480 passed to free: value not allocated Aborted Failed minimal-crystax-x86-4.9-libcxx 140 KB/s (6008 bytes in 0.041s) Invalid address 0xb75d5480 passed to free: value not allocated Aborted Failed minimal-crystax-x86-clang3.5-gnustl 140 KB/s (6024 bytes in 0.041s) Invalid address 0xb75d9480 passed to free: value not allocated Aborted Failed minimal-crystax-x86-clang3.5-libcxx 140 KB/s (6024 bytes in 0.041s) Segmentation fault Failed minimal-crystax-x86-clang3.6-gnustl 3 KB/s (6024 bytes in 1.500s) Invalid address 0xb7648480 passed to free: value not allocated Aborted Failed minimal-crystax-x86-clang3.6-libcxx 138 KB/s (6024 bytes in 0.042s) Invalid address 0xb75fa480 passed to free: value not allocated Aborted Failed
Files
Updated by Dmitry M. about 9 years ago
- Assignee set to Dmitry M.
- Priority changed from Normal to High
- Target version set to 10.3.0
Updated by Dmitry M. about 9 years ago
- Has duplicate Bug #1108: Crash on Android 6.0 added
Updated by Dmitry M. about 9 years ago
Actually this bug has nothing to standalone executables; it can be reproduced with NDK regression tests (see #1108). This happens because of change of @__cxa_finalize@ internals in Android 6.0, which is called on exit. I'm going to fix it.
Updated by Dmitry M. about 9 years ago
- Status changed from In Progress to Duplicate
- % Done changed from 0 to 100
Closing as duplicate