<div dir="ltr"><span style="font-size:12.8px">Hey, guys.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I'm using clang over JNI for syntax highlighting in my Android apps.</div><div style="font-size:12.8px">It worked great until Android Marshmallow, and now it crashes (Fatal signal 11 (SIGSEGV)) in library loading (System.loadLibrary() in java code).</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I was able to get stacktrace:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.089: WARN/linker(1838): /data/data/name.antonsmirnov.android.myapp2/se/libclang.so: unused DT entry: type 0x1d arg 0x3409</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.095: ERROR/chromium(1838): ### WebView Version 40 (1808730-x86) (code 400007)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.096: ASSERT/libc(1838): Fatal signal 11 (SIGSEGV), code -6, fault addr 0x72e in tid 1838 (d.myapp2)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): Build fingerprint: 'Android/vbox86p/vbox86p:6.0/MRA58K/buildbot10191552:userdebug/test-keys'</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): Revision: '0'</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): ABI: 'x86'</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): pid: 1838, tid: 1838, name: d.myapp2  >>> name.antonsmirnov.android.myapp2 <<<</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): signal 11 (SIGSEGV), code -6 (SI_TKILL), fault addr 0x5</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.152: ASSERT/DEBUG(102): eax 00000001  ebx 9c2fec98  ecx 9c2fec98  edx 9c3ff928</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.152: ASSERT/DEBUG(102): esi 9c3061c0  edi 00000000</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.152: ASSERT/DEBUG(102): xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000007  xss 0000007b</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.152: ASSERT/DEBUG(102): eip 9bd06d62  ebp 00000003  esp bf810f60  flags 00210202</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): backtrace:</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #00 pc 01369d62  /data/data/name.antonsmirnov.android.myapp2/se/libclang.so (void* llvm::object_creator<(anonymous namespace)::CommandLineParser>()+34)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #01 pc 0137cb5b  /data/data/name.antonsmirnov.android.myapp2/se/libclang.so (llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) const+91)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #02 pc 0136bdb6  /data/data/name.antonsmirnov.android.myapp2/se/libclang.so (llvm::cl::Option::addArgument()+422)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #03 pc 001020d6  /data/data/name.antonsmirnov.android.myapp2/se/libclang.so (_GLOBAL__sub_I__ZN4llvm21X86AsmInstrumentationC2ERKNS_15MCSubtargetInfoE+262)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #04 pc 00003203  /system/bin/linker (__dl__ZN6soinfo17call_constructorsEv.part.140+1055)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #05 pc 0000b8ff  /system/bin/linker (__dl__Z9do_dlopenPKciPK17android_dlextinfo+495)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): #06 pc 0000213c  /system/bin/linker (__dl_dlopen+59)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): #07 pc 003a6287  /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, _jobject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+759)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): #08 pc 00470d5d  /system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, _jobject*, _jstring*)+301)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): #09 pc 72eba6ce  /data/dalvik-cache/x86/system@framework@boot.oat (offset 0x1eb6000)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): #10 pc 33242453  <unknown></font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.317: ASSERT/DEBUG(102): Tombstone written to: /data/tombstones/tombstone_00</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.317: ERROR/DEBUG(102): AM write failed: Broken pipe</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.317: INFO/BootReceiver(656): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.319: WARN/ActivityManager(656): Force finishing activity name.antonsmirnov.android.myapp2/name.antonsmirnov.android.myapp.ui.MainActivity</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 06:15:47.347: INFO/Zygote(333): Process 1838 exited due to signal (11)</font></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Any thoughts why it happens?</div><div style="font-size:12.8px">Is it know bug/feature? Any fix or ideas on how to fix it?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I know Android Marshmallow brings new security model and now permissions should be requested in runtime but what permissions are required in this case?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Regards, Anton.</div></div>