Boost C++ Libraries: Ticket #12799: Crash occurs inside fiber inside sscanf on Android https://svn.boost.org/trac10/ticket/12799 <p> I started migrating from boost_1_62_0 to boost_1_63_0. </p> <p> Migration failed: application crashed (no changes in my code). </p> <p> I have constructed a minimal example that leads to crash. The test (boostTest.cpp file): </p> <pre class="wiki">#include &lt;cassert&gt; #include &lt;android/log.h&gt; #include &lt;boost/context/all.hpp&gt; #define TRACE(...) __android_log_print(ANDROID_LOG_DEBUG, "boostTest", __VA_ARGS__) void callSscanf() { TRACE("callSscanf begin"); TRACE("callSscanf line=%d",__LINE__); if ( true ) { int n1=0; int n2=0; sscanf("1 23", "%d %d", &amp;n1,&amp;n2); assert(n1==1); assert(n2==23); } TRACE("callSscanf line=%d",__LINE__); if(true) { int n1=0; int n2=0; sscanf("1 jjj 23", "%d %*[j] %d", &amp;n1,&amp;n2); assert(n1==1); assert(n2==23); } TRACE("callSscanf end"); } void FiberProc(void* arg) { TRACE("FiberProc begin"); boost::context::execution_context&amp; mainCtx = *((boost::context::execution_context*)arg); callSscanf(); mainCtx(); TRACE("FiberProc unreachable!!!"); assert(false); // not reachable } void boostContextTest() { TRACE("boostContextTest start"); { TRACE("boostContextTest calling WITHOUT fiber"); callSscanf(); } { TRACE("boostContextTest calling WITH fiber"); boost::context::execution_context mainCtx(boost::context::execution_context::current()); boost::context::execution_context childCtx(&amp;FiberProc); childCtx(&amp;mainCtx); } TRACE("boostContextTest end"); } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12799 Trac 1.4.3 Lev Sch <zorechfan@…> Tue, 31 Jan 2017 19:16:01 GMT attachment set https://svn.boost.org/trac10/ticket/12799 https://svn.boost.org/trac10/ticket/12799 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">HelloJNI.zip</span> </li> </ul> Ticket Lev Sch <zorechfan@…> Tue, 31 Jan 2017 19:16:31 GMT <link>https://svn.boost.org/trac10/ticket/12799#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:1</guid> <description> <p> Second sscanf is crashed. Notes: </p> <ol><li>if boost_1_62_0 and callSscanf is called in main or from fiber context then no crash. </li><li>if boost_1_63_0 and callSscanf is called in main context then no crash </li><li>if boost_1_63_0 and callSscanf is called in fiber context then CRASH </li></ol><p> Architecture: android x86(32bit) api23 </p> <p> Android Studio project is attached. Before build, updating path to boost is required in CMakeLists.txt. </p> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Wed, 15 Mar 2017 12:40:08 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/12799 https://svn.boost.org/trac10/ticket/12799 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">HelloJNI_cpp_rational.zip</span> </li> </ul> Ticket Lev Sch <zorechfan@…> Wed, 15 Mar 2017 12:41:36 GMT <link>https://svn.boost.org/trac10/ticket/12799#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:2</guid> <description> <p> I have found another way to reproduce by using boost::multiprecision::cpp_rational. </p> <p> Steps to reproduce: </p> <ol><li>Unpack HelloJNI_cpp_rational.zip into a folder </li><li>open the unpaked folder by Android Studio </li><li>Android Studio requests to use gradle wrapper. Click "OK". </li><li>Android Studio opens the project. </li><li>on left bottom place, click "Build Variants" tab </li><li>on opened tab, set "Build Variant" to "x86Release" </li><li>in HelloJNI\app\src\main\cpp\CMakeLists.txt update BOOST_ROOT </li><li>Build and run app: click "play" button or Shift+F10 </li></ol><p> Results: </p> <ol><li>boost_1_62_0 &amp; (x86Release | x86Debug) =&gt; OK </li><li>boost_1_63_0 &amp; x86Debug =&gt; OK </li><li>boost_1_63_0 &amp; x86Release =&gt; crash </li><li>boost_1_63_0 &amp; x86Release &amp; (*.S files from boost_1_62_0) =&gt; OK </li></ol><p> Note: *.S files are: </p> <blockquote> <p> jump_i386_sysv_elf_gas.S make_i386_sysv_elf_gas.S ontop_i386_sysv_elf_gas.S </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 15 Mar 2017 13:54:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:3</guid> <description> <p> Could you test the code from github + branch develop? </p> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Wed, 15 Mar 2017 13:57:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:4</guid> <description> <p> Yes. I can git clone and test. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 15 Mar 2017 14:00:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:5</guid> <description> <p> I need architecture + complete compiler output (errors) </p> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Wed, 15 Mar 2017 14:14:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:6</guid> <description> <p> device architecture: x86_64 build output: </p> <pre class="wiki">Executing tasks: [:app:assembleX86Release] Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :app:preBuild UP-TO-DATE :app:preX86ReleaseBuild UP-TO-DATE :app:checkX86ReleaseManifest :app:preX86DebugBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE :app:prepareComAndroidSupportConstraintConstraintLayout100Alpha7Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE :app:prepareX86ReleaseDependencies :app:compileX86ReleaseAidl UP-TO-DATE :app:compileX86ReleaseRenderscript UP-TO-DATE :app:generateX86ReleaseBuildConfig UP-TO-DATE :app:generateX86ReleaseResValues UP-TO-DATE :app:generateX86ReleaseResources UP-TO-DATE :app:mergeX86ReleaseResources UP-TO-DATE :app:processX86ReleaseManifest UP-TO-DATE :app:processX86ReleaseResources :app:generateX86ReleaseSources :app:incrementalX86ReleaseJavaCompilationSafeguard :app:compileX86ReleaseJavaWithJavac :app:compileX86ReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). :app:generateJsonModelX86Release UP-TO-DATE :app:externalNativeBuildX86Release building C:\temp\androidSandbox\HelloJNI_cpp_rational\HelloJNI\app\build\intermediates\cmake\x86\release\obj\x86\libhello-jni.so :app:compileX86ReleaseSources :app:lintVitalX86Release :app:mergeX86ReleaseShaders :app:compileX86ReleaseShaders :app:generateX86ReleaseAssets :app:mergeX86ReleaseAssets :app:transformClassesWithDexForX86Release :app:mergeX86ReleaseJniLibFolders :app:transformNative_libsWithMergeJniLibsForX86Release :app:transformNative_libsWithStripDebugSymbolForX86Release :app:processX86ReleaseJavaRes UP-TO-DATE :app:transformResourcesWithMergeJavaResForX86Release :app:validateSigningX86Release :app:packageX86Release :app:assembleX86Release BUILD SUCCESSFUL Total time: 13.593 secs </pre><p> log: </p> <pre class="wiki">03-15 14:09:42.548 2909-2909/? D/AndroidRuntime: &gt;&gt;&gt;&gt;&gt;&gt; START com.android.internal.os.RuntimeInit uid 2000 &lt;&lt;&lt;&lt;&lt;&lt; 03-15 14:09:42.549 2909-2909/? D/AndroidRuntime: CheckJNI is ON 03-15 14:09:42.549 2909-2909/? E/cutils-trace: Error opening trace file: Permission denied (13) 03-15 14:09:42.610 2909-2909/? W/art: Unexpected CPU variant for X86 using defaults: x86_64 03-15 14:09:42.637 2909-2909/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat 03-15 14:09:42.649 2909-2909/? E/memtrack: Couldn't load memtrack module (No such file or directory) 03-15 14:09:42.649 2909-2909/? E/android.os.Debug: failed to load memtrack module: -2 03-15 14:09:42.650 2909-2909/? I/Radio-JNI: register_android_hardware_Radio DONE 03-15 14:09:42.657 2909-2909/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm 03-15 14:09:42.673 2909-2909/? I/art: System.exit called, status: 0 03-15 14:09:42.673 2909-2909/? I/AndroidRuntime: VM exiting with result code 0. 03-15 14:09:57.948 2923-2923/? D/AndroidRuntime: &gt;&gt;&gt;&gt;&gt;&gt; START com.android.internal.os.RuntimeInit uid 2000 &lt;&lt;&lt;&lt;&lt;&lt; 03-15 14:09:57.949 2923-2923/? D/AndroidRuntime: CheckJNI is ON 03-15 14:09:57.949 2923-2923/? E/cutils-trace: Error opening trace file: Permission denied (13) 03-15 14:09:58.050 2923-2923/? W/art: Unexpected CPU variant for X86 using defaults: x86_64 03-15 14:09:58.053 2923-2923/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat 03-15 14:09:58.065 2923-2923/? E/memtrack: Couldn't load memtrack module (No such file or directory) 03-15 14:09:58.065 2923-2923/? E/android.os.Debug: failed to load memtrack module: -2 03-15 14:09:58.065 2923-2923/? I/Radio-JNI: register_android_hardware_Radio DONE 03-15 14:09:58.074 2929-2929/? D/AndroidRuntime: &gt;&gt;&gt;&gt;&gt;&gt; START com.android.internal.os.RuntimeInit uid 2000 &lt;&lt;&lt;&lt;&lt;&lt; 03-15 14:09:58.075 2929-2929/? D/AndroidRuntime: CheckJNI is ON 03-15 14:09:58.075 2929-2929/? E/cutils-trace: Error opening trace file: Permission denied (13) 03-15 14:09:58.076 2923-2923/? D/AndroidRuntime: Calling main entry com.android.commands.wm.Wm 03-15 14:09:58.077 2923-2923/? D/AndroidRuntime: Shutting down VM 03-15 14:09:58.136 2929-2929/? W/art: Unexpected CPU variant for X86 using defaults: x86_64 03-15 14:09:58.140 2929-2929/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat 03-15 14:09:58.150 2929-2929/? E/memtrack: Couldn't load memtrack module (No such file or directory) 03-15 14:09:58.150 2929-2929/? E/android.os.Debug: failed to load memtrack module: -2 03-15 14:09:58.150 2929-2929/? I/Radio-JNI: register_android_hardware_Radio DONE 03-15 14:09:58.159 2929-2929/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm [ 03-15 14:09:58.183 1230: 1230 I/ ] free_cache(1384400) avail 455221248 --------- beginning of system 03-15 14:09:58.256 1488-1516/system_process I/ActivityManager: Killing 2561:com.android.keychain/1000 (adj 906): empty for 1803s 03-15 14:09:58.275 1488-1516/system_process I/PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl177924478.tmp/base.apk pkg=com.example.hellojni isa=x86 vmSafeMode=false debuggable=false target-filter=interpret-only oatDir = /data/app/vmdl177924478.tmp/oat sharedLibraries=null 03-15 14:09:58.290 2948-2948/? W/dex2oat: Unexpected CPU variant for X86 using defaults: x86 03-15 14:09:58.290 2948-2948/? W/dex2oat: Mismatch between dex2oat instruction set features (ISA: X86 Feature string: smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,-lock_add,-popcnt) and those of dex2oat executable (ISA: X86 Feature string: smp,ssse3,sse4.1,sse4.2,-avx,-avx2,-lock_add,popcnt) for the command line: 03-15 14:09:58.290 2948-2948/? W/dex2oat: /system/bin/dex2oat --zip-fd=6 --zip-location=base.apk --oat-fd=7 --oat-location=/data/app/vmdl177924478.tmp/oat/x86/base.odex --instruction-set=x86 --instruction-set-variant=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=interpret-only --swap-fd=9 03-15 14:09:58.290 2948-2948/? I/dex2oat: /system/bin/dex2oat --compiler-filter=interpret-only 03-15 14:09:58.291 2948-2948/? E/cutils-trace: Error opening trace file: Permission denied (13) 03-15 14:09:58.533 2948-2948/? W/dex2oat: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView 03-15 14:09:58.542 2948-2950/? W/dex2oat: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 03-15 14:09:59.204 2948-2948/? I/dex2oat: dex2oat took 913.578ms (threads: 2) arena alloc=1648B (1648B) java alloc=2MB (2225080B) native alloc=3MB (3256296B) free=1940KB (1986584B) 03-15 14:09:59.211 1488-1503/system_process I/ActivityManager: Force stopping com.example.hellojni appid=10074 user=-1: installPackageLI 03-15 14:09:59.280 1488-1516/system_process I/PackageManager: Package com.example.hellojni codePath changed from /data/app/com.example.hellojni-1 to /data/app/com.example.hellojni-2; Retaining data and using new 03-15 14:09:59.280 1488-1516/system_process W/PackageManager: Code path for com.example.hellojni changing from /data/app/com.example.hellojni-1 to /data/app/com.example.hellojni-2 03-15 14:09:59.280 1488-1516/system_process W/PackageManager: Resource path for com.example.hellojni changing from /data/app/com.example.hellojni-1 to /data/app/com.example.hellojni-2 03-15 14:09:59.399 1488-1516/system_process I/art: Starting a blocking GC Explicit 03-15 14:09:59.439 1488-1516/system_process I/art: Explicit concurrent mark sweep GC freed 32364(1837KB) AllocSpace objects, 18(460KB) LOS objects, 32% free, 8MB/12MB, paused 754us total 35.984ms [ 03-15 14:09:59.443 1230: 1230 E/ ] Couldn't opendir /data/app/vmdl177924478.tmp: No such file or directory 03-15 14:09:59.445 1488-1516/system_process I/ActivityManager: Force stopping com.example.hellojni appid=10074 user=0: pkg removed 03-15 14:09:59.449 1488-1532/system_process I/InputReader: Reconfiguring input devices. changes=0x00000010 03-15 14:09:59.456 1488-1532/system_process I/InputReader: Reconfiguring input devices. changes=0x00000010 03-15 14:09:59.465 2955-2955/? W/art: Unexpected CPU variant for X86 using defaults: x86_64 03-15 14:09:59.472 1488-1873/system_process I/ActivityManager: Start proc 2955:com.android.keychain/1000 for broadcast com.android.keychain/.KeyChainBroadcastReceiver 03-15 14:09:59.474 1488-1532/system_process I/InputReader: Reconfiguring input devices. changes=0x00000010 03-15 14:09:59.479 2929-2929/? I/art: System.exit called, status: 0 03-15 14:09:59.479 2929-2929/? I/AndroidRuntime: VM exiting with result code 0. 03-15 14:09:59.490 2955-2955/com.android.keychain W/System: ClassLoader referenced unknown path: /system/app/KeyChain/lib/x86_64 03-15 14:09:59.522 1657-1657/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getCarrierPackageNamesForIntent: No UICC 03-15 14:09:59.522 1657-1657/com.android.phone D/CarrierSvcBindHelper: No carrier app for: 0 03-15 14:09:59.522 1657-1657/com.android.phone E/PhoneInterfaceManager: [PhoneIntfMgr] getCarrierPackageNamesForIntent: No UICC 03-15 14:09:59.522 1657-1657/com.android.phone D/CarrierSvcBindHelper: No carrier app for: 0 03-15 14:09:59.523 1657-1657/com.android.phone D/CarrierConfigLoader: mHandler: 9 phoneId: 0 03-15 14:09:59.527 2955-2955/com.android.keychain W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1385 android.content.ContextWrapper.startService:613 android.content.ContextWrapper.startService:613 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:3011 03-15 14:09:59.554 1488-1501/system_process W/VoiceInteractionManagerService: no available voice recognition services found for user 0 03-15 14:09:59.554 1488-1501/system_process W/LocationProviderProxy-network: Odd, no component found for service com.android.location.service.v3.NetworkLocationProvider 03-15 14:09:59.554 1488-1501/system_process W/GeocoderProxy: Odd, no component found for service com.android.location.service.GeocodeProvider 03-15 14:09:59.554 1488-1501/system_process W/GeofenceProxy: Odd, no component found for service com.android.location.service.GeofenceProvider 03-15 14:09:59.555 1488-1501/system_process W/ActivityRecognitionProxy: Odd, no component found for service com.android.location.service.ActivityRecognitionProvider 03-15 14:09:59.792 2978-2978/? D/AndroidRuntime: &gt;&gt;&gt;&gt;&gt;&gt; START com.android.internal.os.RuntimeInit uid 2000 &lt;&lt;&lt;&lt;&lt;&lt; 03-15 14:09:59.793 2978-2978/? D/AndroidRuntime: CheckJNI is ON 03-15 14:09:59.793 2978-2978/? E/cutils-trace: Error opening trace file: Permission denied (13) 03-15 14:09:59.854 2978-2978/? W/art: Unexpected CPU variant for X86 using defaults: x86_64 03-15 14:09:59.857 2978-2978/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat 03-15 14:09:59.867 2978-2978/? E/memtrack: Couldn't load memtrack module (No such file or directory) 03-15 14:09:59.867 2978-2978/? E/android.os.Debug: failed to load memtrack module: -2 03-15 14:09:59.868 2978-2978/? I/Radio-JNI: register_android_hardware_Radio DONE 03-15 14:09:59.877 2978-2978/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am 03-15 14:09:59.883 1488-1499/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.hellojni/.HelloJni} from uid 2000 on display 0 03-15 14:09:59.891 2978-2978/? D/AndroidRuntime: Shutting down VM 03-15 14:09:59.899 2987-2987/? W/art: Unexpected CPU variant for X86 using defaults: x86 03-15 14:09:59.903 1488-1596/system_process I/ActivityManager: Start proc 2987:com.example.hellojni/u0a74 for activity com.example.hellojni/.HelloJni 03-15 14:10:00.064 1568-1568/com.android.systemui W/asset: Asset path /data/app/com.example.hellojni-1/base.apk is neither a directory nor file (type=1). 03-15 14:10:00.064 1568-1568/com.android.systemui W/PackageManager: Failure retrieving resources for com.example.hellojni 03-15 14:10:00.064 1568-1568/com.android.systemui W/asset: Asset path /data/app/com.example.hellojni-1/base.apk is neither a directory nor file (type=1). 03-15 14:10:00.064 1568-1568/com.android.systemui W/PackageManager: Failure retrieving resources for com.example.hellojni 03-15 14:10:00.064 1568-1568/com.android.systemui W/asset: Asset path /data/app/com.example.hellojni-1/base.apk is neither a directory nor file (type=1). 03-15 14:10:00.064 1568-1568/com.android.systemui W/PackageManager: Failure retrieving resources for com.example.hellojni 03-15 14:10:00.164 2987-2987/com.example.hellojni D/boostTest: line void showBuildType() 38 release build 03-15 14:10:00.164 2987-2987/com.example.hellojni D/boostTest: line void boostContextTest2() 47 03-15 14:10:00.164 2987-2987/com.example.hellojni D/boostTest: line void boostContextTest2() 49 calling WITHOUT fiber 03-15 14:10:00.164 2987-2987/com.example.hellojni D/boostTest: line void boostContextTest2() 53 calling WITH fiber 03-15 14:10:00.164 2987-2987/com.example.hellojni D/boostTest: line void FiberProc2(void *) 26 --------- beginning of crash 03-15 14:10:00.164 2987-2987/com.example.hellojni A/libc: Fatal signal 11 (SIGSEGV), code 128, fault addr 0x0 in tid 2987 (xample.hellojni) [ 03-15 14:10:00.165 1175: 1175 W/ ] debuggerd: handling request: pid=2987 uid=10074 gid=10074 tid=2987 03-15 14:10:00.198 3006-3006/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 03-15 14:10:00.198 3006-3006/? A/DEBUG: Build fingerprint: 'Android/sdk_phone_x86_64/generic_x86_64:7.0/NYC/3245079:userdebug/test-keys' 03-15 14:10:00.198 3006-3006/? A/DEBUG: Revision: '0' 03-15 14:10:00.198 3006-3006/? A/DEBUG: ABI: 'x86' 03-15 14:10:00.198 3006-3006/? A/DEBUG: pid: 2987, tid: 2987, name: xample.hellojni &gt;&gt;&gt; com.example.hellojni &lt;&lt;&lt; 03-15 14:10:00.198 3006-3006/? A/DEBUG: signal 11 (SIGSEGV), code 128 (SI_KERNEL), fault addr 0x0 03-15 14:10:00.198 3006-3006/? A/DEBUG: eax 00000035 ebx d376978c ecx 00000035 edx 3fe00000 03-15 14:10:00.198 3006-3006/? A/DEBUG: esi 00000000 edi d3593850 03-15 14:10:00.198 3006-3006/? A/DEBUG: xcs 00000023 xds 0000002b xes 0000002b xfs 0000006b xss 0000002b 03-15 14:10:00.198 3006-3006/? A/DEBUG: eip d36b6acf ebp d3593850 esp d3593758 flags 00000202 03-15 14:10:00.198 3006-3006/? A/DEBUG: backtrace: 03-15 14:10:00.198 3006-3006/? A/DEBUG: #00 pc 00018acf /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_ZN5boost14multiprecision8backends15cpp_int_backendILj0ELj0ELNS0_16cpp_integer_typeE1ELNS0_18cpp_int_check_typeE0ESaImEE20do_assign_arithmeticEeRKN4mpl_5bool_ILb0EEE+367) 03-15 14:10:00.198 3006-3006/? A/DEBUG: #01 pc 0001864e /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_ZN5boost14multiprecision8backends16rational_adaptorINS1_15cpp_int_backendILj0ELj0ELNS0_16cpp_integer_typeE1ELNS0_18cpp_int_check_typeE0ESaImEEEEaSIeEENS_9enable_ifINS_17is_floating_pointIT_EERS8_E4typeESC_+126) 03-15 14:10:00.198 3006-3006/? A/DEBUG: #02 pc 000180b7 /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_Z23testCpp_rational_getValv+103) 03-15 14:10:00.198 3006-3006/? A/DEBUG: #03 pc 000181b9 /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_Z10FiberProc2Pv+73) 03-15 14:10:00.199 3006-3006/? A/DEBUG: #04 pc 0001ee7b /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_ZN5boost7context17execution_context10entry_funcINS0_6detail14capture_recordINS0_21basic_fixedsize_stackINS0_12stack_traitsEEEPFvPvEJEEEEEvNS3_10transfer_tE+59) 03-15 14:10:00.199 3006-3006/? A/DEBUG: #05 pc 0002263a /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (make_fcontext+66) [ 03-15 14:10:00.418 1175: 1175 W/ ] debuggerd: resuming target 2987 03-15 14:10:00.418 1488-1507/system_process I/BootReceiver: Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE) 03-15 14:10:00.448 1226-1226/? I/Zygote: Process 2987 exited due to signal (11) 03-15 14:10:00.690 1488-3019/system_process W/ActivityManager: Force finishing activity com.example.hellojni/.HelloJni 03-15 14:10:00.692 1488-3019/system_process W/ActivityManager: Exception thrown during pause android.os.DeadObjectException at android.os.BinderProxy.transactNative(Native Method) at android.os.BinderProxy.transact(Binder.java:615) at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:784) at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1128) at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3483) at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:3319) at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:1821) at com.android.server.am.AppErrors.handleAppCrashLocked(AppErrors.java:619) at com.android.server.am.AppErrors.makeAppCrashingLocked(AppErrors.java:481) at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:357) at com.android.server.am.AppErrors.crashApplication(AppErrors.java:309) at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:13226) at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86) 03-15 14:10:00.697 1218-1218/? E/lowmemorykiller: Error opening /proc/2987/oom_score_adj; errno=2 03-15 14:10:00.786 1220-1220/? D/gralloc: Registering a buffer in the process that created it. This may cause memory ordering problems. 03-15 14:10:00.786 1220-1220/? E/libEGL: called unimplemented OpenGL ES API 03-15 14:10:00.786 1220-1220/? E/SurfaceFlinger: glCheckFramebufferStatusOES error -816011848 03-15 14:10:00.786 1220-1220/? E/SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 03-15 14:10:00.787 1488-3019/system_process W/WindowManager: Screenshot failure taking screenshot for (480x800) to layer 22010 03-15 14:10:00.799 1488-1686/system_process W/art: Long monitor contention with owner NativeCrashReport (3019) at void com.android.server.am.AppErrors.crashApplicationInner(com.android.server.am.ProcessRecord, android.app.ApplicationErrorReport$CrashInfo)(AppErrors.java:328) waiters=0 in void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied() for 350ms 03-15 14:10:00.799 1488-1686/system_process I/ActivityManager: Process com.example.hellojni (pid 2987) has died 03-15 14:10:00.799 1488-1488/system_process W/art: Long monitor contention with owner NativeCrashReport (3019) at void com.android.server.am.AppErrors.crashApplicationInner(com.android.server.am.ProcessRecord, android.app.ApplicationErrorReport$CrashInfo)(AppErrors.java:328) waiters=1 in int com.android.server.am.ActivityManagerService.broadcastIntent(android.app.IApplicationThread, android.content.Intent, java.lang.String, android.content.IIntentReceiver, int, java.lang.String, android.os.Bundle, java.lang.String[], int, android.os.Bundle, boolean, boolean, int) for 347ms 03-15 14:10:00.800 1488-1503/system_process W/art: Long monitor contention with owner NativeCrashReport (3019) at void com.android.server.am.AppErrors.crashApplicationInner(com.android.server.am.ProcessRecord, android.app.ApplicationErrorReport$CrashInfo)(AppErrors.java:328) waiters=2 in void com.android.server.am.ActivityStack$ActivityStackHandler.handleMessage(android.os.Message) for 334ms 03-15 14:10:00.812 1488-1596/system_process W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4871c08 attribute=android.view.inputmethod.EditorInfo@e418fa1, token = android.os.BinderProxy@d34b1e0 03-15 14:10:01.221 1488-1510/system_process I/WindowManager: Destroying surface Surface(name=Starting com.example.hellojni) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.AppWindowToken.destroySurfaces:365 com.android.server.wm.WindowStateAnimator.finishExit:565 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:427 com.android.server.wm.WindowAnimator.updateAppWindowsLocked:196 03-15 14:10:04.563 1488-1873/system_process I/ActivityManager: Killing 2706:com.android.documentsui/u0a7 (adj 906): empty for 1810s 03-15 14:10:08.285 1488-1874/system_process I/ActivityManager: Killing 2723:android.process.media/u0a8 (adj 906): empty for 1813s </pre> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Wed, 15 Mar 2017 14:20:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:7</guid> <description> <p> Symbolicated crash: </p> <pre class="wiki">********** Crash dump: ********** Build fingerprint: 'Android/sdk_phone_x86_64/generic_x86_64:7.0/NYC/3245079:userdebug/test-keys' pid: 2987, tid: 2987, name: xample.hellojni &gt;&gt;&gt; com.example.hellojni &lt;&lt;&lt; signal 11 (SIGSEGV), code 128 (SI_KERNEL), fault addr 0x0 Stack frame 03-15 14:10:00.198 3006-3006/? A/DEBUG: #00 pc 00018acf /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_ZN5boost14multiprecision8backends15cpp_int_backendILj0ELj0ELNS0_16cpp_integer_typeE1ELNS0_18cpp_int_check_typeE0ESaImEE20do_assign_arithmeticEeRKN4mpl_5bool_ILb0EEE+367): Routine boost::multiprecision::backends::cpp_int_backend&lt;0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator&lt;unsigned long&gt; &gt;::do_assign_arithmetic(long double, mpl_::bool_&lt;false&gt; const&amp;) at C:/lib/boost_1_63_0\boost/multiprecision/cpp_int.hpp:1294 Stack frame 03-15 14:10:00.198 3006-3006/? A/DEBUG: #01 pc 0001864e /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_ZN5boost14multiprecision8backends16rational_adaptorINS1_15cpp_int_backendILj0ELj0ELNS0_16cpp_integer_typeE1ELNS0_18cpp_int_check_typeE0ESaImEEEEaSIeEENS_9enable_ifINS_17is_floating_pointIT_EERS8_E4typeESC_+126): Routine _ZN5boost14multiprecision8backends15cpp_int_backendILj0ELj0ELNS0_16cpp_integer_typeE1ELNS0_18cpp_int_check_typeE0ESaImEEaSIeEENS_11enable_if_cIXntsr5boost14multiprecision6detail17is_byte_containerIT_EE5valueERS6_E4typeES9_ at C:/lib/boost_1_63_0\boost/multiprecision/cpp_int.hpp:1311 Stack frame 03-15 14:10:00.198 3006-3006/? A/DEBUG: #02 pc 000180b7 /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_Z23testCpp_rational_getValv+103): Routine number&lt;double&gt; at C:/lib/boost_1_63_0\boost/multiprecision/number.hpp:53 Stack frame 03-15 14:10:00.198 3006-3006/? A/DEBUG: #03 pc 000181b9 /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_Z10FiberProc2Pv+73): Routine testCpp_rational_test() at C:\temp\androidSandbox\HelloJNI_cpp_rational\HelloJNI\app\src\main\cpp/boostTest.cpp:15 Stack frame 03-15 14:10:00.199 3006-3006/? A/DEBUG: #04 pc 0001ee7b /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (_ZN5boost7context17execution_context10entry_funcINS0_6detail14capture_recordINS0_21basic_fixedsize_stackINS0_12stack_traitsEEEPFvPvEJEEEEEvNS3_10transfer_tE+59): Routine _ZN5boost7context6detail6invokeIRPFvPvEJRS3_EEENSt9enable_ifIXntsr3std17is_member_pointerINSt5decayIT_E4typeEEE5valueENSt9result_ofIFOSA_DpOT0_EE4typeEE4typeESE_SH_ at C:/lib/boost_1_63_0\boost/context/detail/invoke.hpp:41 (discriminator 2) Stack frame 03-15 14:10:00.199 3006-3006/? A/DEBUG: #05 pc 0002263a /data/app/com.example.hellojni-2/lib/x86/libhello-jni.so (make_fcontext+66): Routine trampoline at C:\\lib\\boost_1_63_0\\libs\\context\\src\\asm/make_i386_sysv_elf_gas.S:88 </pre> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Wed, 15 Mar 2017 14:29:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:8</guid> <description> <p> Compiler options: </p> <pre class="wiki"> { "buildFiles" : [ "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/src/main/cpp/CMakeLists.txt" ], "cFileExtensions" : [ "S" ], "cleanCommands" : [ "C:\\lib\\AndroidStudioSdk\\1\\cmake\\3.6.3155560\\bin\\cmake.exe --build C:\\temp\\androidSandbox\\HelloJNI_cpp_rational\\HelloJNI\\app\\.externalNativeBuild\\cmake\\x86Release\\x86 --target clean" ], "cppFileExtensions" : [ "cpp" ], "libraries" : { "hello-jni-Release-x86" : { "abi" : "x86", "artifactName" : "hello-jni", "buildCommand" : "C:\\lib\\AndroidStudioSdk\\1\\cmake\\3.6.3155560\\bin\\cmake.exe --build C:\\temp\\androidSandbox\\HelloJNI_cpp_rational\\HelloJNI\\app\\.externalNativeBuild\\cmake\\x86Release\\x86 --target hello-jni", "buildType" : "release", "files" : [ { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\libs\\x86\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include\\backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/src/main/cpp/hello-jni.cpp", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\libs\\x86\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include\\backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/src/main/cpp/boostTest.cpp", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\libs\\x86\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include\\backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/system/src/error_code.cpp", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\libs\\x86\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include\\backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/context/src/execution_context.cpp", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\libs\\x86\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include\\backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/context/src/posix/stack_traits.cpp", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/context/src/asm/jump_i386_sysv_elf_gas.S", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/context/src/asm/make_i386_sysv_elf_gas.S", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/context/src/asm/ontop_i386_sysv_elf_gas.S", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\libs\\x86\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include\\backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/thread/src/pthread/once.cpp", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" }, { "flags" : " -target i686-none-linux-android -gcc-toolchain C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/lib/AndroidStudioSdk/1/ndk-bundle/platforms/android-23/arch-x86 -Dhello_jni_EXPORTS -IC:\\lib\\boost_1_63_0 -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\libs\\x86\\include -isystem C:\\lib\\AndroidStudioSdk\\1\\ndk-bundle\\sources\\cxx-stl\\gnu-libstdc++\\4.9\\include\\backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O2 -DNDEBUG -O2 -DNDEBUG -fPIC -fexceptions -std=c++14 -DBOOST_NO_TYPEID -DBOOST_EXECUTION_CONTEXT=1 -fno-rtti -c ", "src" : "C:/lib/boost_1_63_0/libs/thread/src/pthread/thread.cpp", "workingDirectory" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/.externalNativeBuild/cmake/x86Release/x86" } ], "output" : "C:/temp/androidSandbox/HelloJNI_cpp_rational/HelloJNI/app/build/intermediates/cmake/x86/release/obj/x86/libhello-jni.so", "toolchain" : "735417383" } }, "toolchains" : { "735417383" : { "cCompilerExecutable" : "C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe", "cppCompilerExecutable" : "C:/lib/AndroidStudioSdk/1/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" } } } </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 15 Mar 2017 15:44:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:9</guid> <description> <p> Sorry - I've no idea. It's too much output,I do not see which line of code causes the problem. Please note that i386/x86_64 boost-regression tests work - I don't develop for Android. Seams that Android does something different like LINUX (ELF+SYS V). Unfortunately I'm too busy to deal with Android. </p> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Wed, 15 Mar 2017 15:54:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:10</guid> <description> <p> If change line </p> <pre class="wiki">boost::multiprecision::cpp_rational n3 = 0.5; </pre><p> to </p> <pre class="wiki">boost::multiprecision::cpp_rational n3(1,2); // is same as 0.5; </pre><p> in file HelloJNI\app\src\main\cpp\boostTest.cpp then no crash. </p> <p> Probably something with floating point... </p> <p> Thank you for a try. </p> </description> <category>Ticket</category> </item> <item> <author>bdowning@…</author> <pubDate>Thu, 16 Mar 2017 20:30:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:11</guid> <description> <p> I believe I've fixed the likely cause of this in the pull request here: <a class="ext-link" href="https://github.com/boostorg/context/pull/47"><span class="icon">​</span>https://github.com/boostorg/context/pull/47</a> </p> <p> A recent change broke stack alignment on arm32-elf, which amongst other things causes anything using varargs (notably libc formatted I/O) to be broken. </p> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Fri, 17 Mar 2017 10:49:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:12</guid> <description> <p> I've found that adding compiller option "-mstackrealign" stops reproduce described here <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/12799#comment:2" title="#12799: Bugs: Crash occurs inside fiber inside sscanf on Android (closed: worksforme)">ticket:12799#comment:2</a> </p> <p> Then I found related tiket <a class="ext-link" href="https://code.google.com/p/android/issues/detail?id=222239"><span class="icon">​</span>https://code.google.com/p/android/issues/detail?id=222239</a>. </p> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Fri, 17 Mar 2017 12:11:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:13</guid> <description> <p> Both sscanf and cpp_rational cases are reproduced on android-ndk-<a class="changeset" href="https://svn.boost.org/trac10/changeset/14" title="*** empty log message *** ">r14</a> without "-mstackrealign" compiler flag. And both stop reproduce if the flag is added. </p> <p> So, I think this ticket is for Android and not for Boost library. </p> <p> It was difficult to detect. </p> <p> Thank you! </p> </description> <category>Ticket</category> </item> <item> <author>Lev Sch <zorechfan@…></author> <pubDate>Sat, 18 Mar 2017 13:34:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12799#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12799#comment:14</guid> <description> <p> Note: the cases are reproduced on android-ndk-r13b and are not reproduced on android-ndk-<a class="changeset" href="https://svn.boost.org/trac10/changeset/14" title="*** empty log message *** ">r14</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sat, 18 Mar 2017 21:12:55 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12799#comment:15 https://svn.boost.org/trac10/ticket/12799#comment:15 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> OK, ty - so I'll close this bugreport as 'Works for me'. </p> Ticket