BruceWind / AESJniEncrypt

🛡 Make safest code in Android. (基于libsodium实现chacha20算法,key在native中,防止被二次打包){长期维护,请star,勿fork}
Other
1k stars 164 forks source link

Android 10 调用会Crash. #38

Closed LoquatZ closed 3 years ago

LoquatZ commented 3 years ago

Android 10 调用会Crash.

堆栈如下


--logversion:utracea
Process Name: 'com.angel.league'
Thread Name: 'RxCachedThreadS'
pid: 1030, tid: 2968  >>> com.angel.league <<<
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
r0 00000000  r1 00000b98  r2 00000006  r3 ba4df8a8
r4 ba4df8bc  r5 ba4df8a0  r6 00000406  r7 0000016b
r8 ba4df8b8  r9 ba4df8a8  10 ba4df8d8  fp ba4df8c8
ip 00000b98  sp ba4df878  lr ed45c143  pc ed45c156  cpsr 000b0030
d0  6566667500000000  d1  20646e6500000000
d2  594c4945bd87778e  d3  312f3030bf000000
d4  00000000bc2d8b60  d5  30006d8eeb1ecbc0
d6  efe8dd4cb9a55c21  d7  eaeae04d1a430fa8
d8  0000000000000000  d9  0000000000000000
d10 0000000000000000  d11 0000000000000000
d12 0000000000000000  d13 0000000000000000
d14 0000000000000000  d15 0000000000000000
d16 0000000000000000  d17 0000000000000000
d18 006e006f0070006d  d19 00460074006e0065
d20 0018310800183108  d21 0000000000000000
d22 eae68b81eae68af1  d23 eae68651eae685f1
d24 eae683b1eae68351  d25 eae68471eae68411
d26 eae681d1eae68171  d27 eae68291eae68231
d28 ebf377677405e182  d29 f011935f026dfe37
d30 0000000000000028  d31 abf0ecfaa590e738
scr 2800001b
#00  pc 0002a156  /apex/com.android.runtime/lib/bionic/libc.so (abort)
#00  pc 0002a156  /apex/com.android.runtime/lib/bionic/libc.so
#01  pc 0002a143  /apex/com.android.runtime/lib/bionic/libc.so
--- --- ---

[DEBUG] Read self maps instead! map: 0x0 00 pc 0002a156 /apex/com.android.runtime/lib/bionic/libc.so (abort+165) 01 pc 00045cf3 /apex/com.android.runtime/lib/bionic/libc.so (_ZL15__fortify_fatalPKcz+26) 02 pc 000463fb /apex/com.android.runtime/lib/bionic/libc.so (__strlen_chk+18) 03 pc 00000ff3 /data/app/com.angel.league-kSNzosn0FERNGWVhbwYS8g==/lib/arm/libJNIEncrypt.so (getKey+58) 04 pc 00001047 /data/app/com.angel.league-kSNzosn0FERNGWVhbwYS8g==/lib/arm/libJNIEncrypt.so (encode+30) 05 pc 0000d519 /apex/com.android.runtime/lib/libart.so (art_quick_generic_jni_trampoline+40) 06 pc 00008bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) 07 pc 0037160f /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+246) 08 pc 00011009 /apex/com.android.runtime/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+180) 09 pc 0014263f /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_11ShadowFrameEtPNS_6JValueE+274) 10 pc 0013e7a7 /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+802) 11 pc 00368ccb /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+318) 12 pc 00003994 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20) 13 pc 00000046 00000046

BruceWind commented 3 years ago

sorry for hearing you encountered. 我过几天看下。

On Sat, 31 Oct 2020 at 13:32, 周枇杷! notifications@github.com wrote:

Android 10 调用会Crash.

-堆栈如下

--logversion:utracea

Process Name: 'com.angel.league'

Thread Name: 'RxCachedThreadS'

pid: 1030, tid: 2968 >>> com.angel.league <<<

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------

r0 00000000 r1 00000b98 r2 00000006 r3 ba4df8a8

r4 ba4df8bc r5 ba4df8a0 r6 00000406 r7 0000016b

r8 ba4df8b8 r9 ba4df8a8 10 ba4df8d8 fp ba4df8c8

ip 00000b98 sp ba4df878 lr ed45c143 pc ed45c156 cpsr 000b0030

d0 6566667500000000 d1 20646e6500000000

d2 594c4945bd87778e d3 312f3030bf000000

d4 00000000bc2d8b60 d5 30006d8eeb1ecbc0

d6 efe8dd4cb9a55c21 d7 eaeae04d1a430fa8

d8 0000000000000000 d9 0000000000000000

d10 0000000000000000 d11 0000000000000000

d12 0000000000000000 d13 0000000000000000

d14 0000000000000000 d15 0000000000000000

d16 0000000000000000 d17 0000000000000000

d18 006e006f0070006d d19 00460074006e0065

d20 0018310800183108 d21 0000000000000000

d22 eae68b81eae68af1 d23 eae68651eae685f1

d24 eae683b1eae68351 d25 eae68471eae68411

d26 eae681d1eae68171 d27 eae68291eae68231

d28 ebf377677405e182 d29 f011935f026dfe37

d30 0000000000000028 d31 abf0ecfaa590e738

scr 2800001b

#00  pc 0002a156  /apex/com.android.runtime/lib/bionic/libc.so (abort)

#00  pc 0002a156  /apex/com.android.runtime/lib/bionic/libc.so

#01  pc 0002a143  /apex/com.android.runtime/lib/bionic/libc.so

--- --- ---

[DEBUG] Read self maps instead! map: 0x0

00 pc 0002a156  /apex/com.android.runtime/lib/bionic/libc.so (abort+165)

01 pc 00045cf3  /apex/com.android.runtime/lib/bionic/libc.so (_ZL15__fortify_fatalPKcz+26)

02 pc 000463fb  /apex/com.android.runtime/lib/bionic/libc.so (__strlen_chk+18)

03 pc 00000ff3  /data/app/com.angel.league-kSNzosn0FERNGWVhbwYS8g==/lib/arm/libJNIEncrypt.so (getKey+58)

04 pc 00001047  /data/app/com.angel.league-kSNzosn0FERNGWVhbwYS8g==/lib/arm/libJNIEncrypt.so (encode+30)

05 pc 0000d519  /apex/com.android.runtime/lib/libart.so (art_quick_generic_jni_trampoline+40)

06 pc 00008bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68)

07 pc 0037160f  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+246)

08 pc 00011009  /apex/com.android.runtime/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+180)

09 pc 0014263f  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_11ShadowFrameEtPNS_6JValueE+274)

10 pc 0013e7a7  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+802)

11 pc 00368ccb  /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+318)

12 pc 00003994  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20)

13 pc 00000046  00000046

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BruceWind/AESJniEncrypt/issues/38, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTGQDNAPTWEHBIAYCJ6DULSNOOPLANCNFSM4TFWB2ZQ .

LoquatZ commented 3 years ago

sorry for hearing you encountered. 我过几天看下。 好的,期待您的回复. 谢谢

BruceWind commented 3 years ago

Hi, bro! Which ndk version do you config in you build environment?

LoquatZ commented 3 years ago

I am very sorry for not replying your message in time! My NDK version is 21.0.6113669.

LoquatZ commented 3 years ago

Another strange thing is that when I run your project, there is no Crash, but after compiling in my project, Individual models Crash. My Project NDK use only abiFilters 'armeabi-v7a',But I don't think that's the point of Crash. Because I confirm that these models all support the 'armeabi-v7a' architecture.

BruceWind commented 3 years ago

I have not built it on NDK 21. I can give you a suggestion : build so with no strip and output symbol table of so file. If you dont have symbol table, you can't find where code crashed at.

Here is a blog about symbol table : csdn-figure-out-where-ndk-crash

LoquatZ commented 3 years ago

Thank Let me try!