Project

General

Profile

Bug #1107

Standalone executables built with CrystaX 10.2.1 crash on Marshmallow

Added by Anonymous almost 4 years ago. Updated almost 4 years ago.

Status:
Duplicated
Priority:
High
Category:
-
Target version:
Start date:
11/06/2015
Due date:
% Done:

100%

Estimated time:
CPU Architecture:
arm, x86
Host OS:
Linux
Toolchain:
clang-3.5, clang-3.6, gcc-4.8, gcc-4.9
Android version:
6.0 (android-23)
CrystaX Version:

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

testproject.tar.bz2 testproject.tar.bz2 1.14 KB Anonymous, 11/06/2015 03:43 PM

Related issues

Has duplicate CrystaX NDK - Bug #1108: Crash on Android 6.0Closed11/06/2015

Actions

History

#1

Updated by Dmitry Moskalchuk almost 4 years ago

  • Assignee set to Dmitry Moskalchuk
  • Priority changed from Normal to High
  • Target version set to 10.3.0
#2

Updated by Dmitry Moskalchuk almost 4 years ago

  • Status changed from Open to In Progress
#3

Updated by Dmitry Moskalchuk almost 4 years ago

  • Has duplicate Bug #1108: Crash on Android 6.0 added
#4

Updated by Dmitry Moskalchuk almost 4 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.

#5

Updated by Dmitry Moskalchuk almost 4 years ago

  • Status changed from In Progress to Duplicated
  • % Done changed from 0 to 100

Closing as duplicate

Also available in: Atom PDF