Android 对OpenSSL的JNI调用导致SIGSEGV

Android 对OpenSSL的JNI调用导致SIGSEGV,android,android-ndk,Android,Android Ndk,我是android NDK开发的新手,对这个小的加密功能(下面使用OpenSSL)有问题: 问题是它会导致SIGSEGV,但仅在某些设备上(比如Nexus7,在android 4.4和4.3上都会崩溃,但在Nexus5上工作正常)。我已经尝试升级OpenSSL库,所以目前我正在使用最新的一个(1.0.1i和fips 2.0.8),但没有帮助。下面是长时间的崩溃日志: 09-17 12:41:52.012: A/libc(17238): Fatal signal 11 (SIGSEGV) at 0

我是android NDK开发的新手,对这个小的加密功能(下面使用OpenSSL)有问题:

问题是它会导致SIGSEGV,但仅在某些设备上(比如Nexus7,在android 4.4和4.3上都会崩溃,但在Nexus5上工作正常)。我已经尝试升级OpenSSL库,所以目前我正在使用最新的一个(1.0.1i和fips 2.0.8),但没有帮助。下面是长时间的崩溃日志:

09-17 12:41:52.012: A/libc(17238): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 17295 (Thread-453)
09-17 12:41:52.072: I/DEBUG(177): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-17 12:41:52.072: I/DEBUG(177): Build fingerprint: 'google/razor/flo:4.4.2/KOT49H/937116:user/release-keys'
09-17 12:41:52.072: I/DEBUG(177): Revision: '0'
09-17 12:41:52.072: I/DEBUG(177): pid: 17238, tid: 17295, name: Thread-453  >>> com.testing.encryption <<<
09-17 12:41:52.072: I/DEBUG(177): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
09-17 12:41:52.192: I/DEBUG(177):     r0 00000000  r1 00000000  r2 76b0ff48  r3 00000000
09-17 12:41:52.192: I/DEBUG(177):     r4 00000000  r5 76b105a8  r6 00000008  r7 41f1d2f8
09-17 12:41:52.192: I/DEBUG(177):     r8 78242b10  r9 760f3e7c  sl 76b0ff58  fp 78242b24
09-17 12:41:52.192: I/DEBUG(177):     ip 756ecfe4  sp 78242ad0  lr 756ea01b  pc 4013dfd8  cpsr 400e0030
09-17 12:41:52.192: I/DEBUG(177):     d0  0000000000000000  d1  0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d2  0000000000000000  d3  0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d4  62617461642f6572  d5  6572632f73657361
09-17 12:41:52.192: I/DEBUG(177):     d6  736c6169746e6564  d7  6c616e72756f6a2d
09-17 12:41:52.192: I/DEBUG(177):     d8  0000000000000000  d9  0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d10 0000000000000000  d11 0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d12 0000000000000000  d13 0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d14 0000000000000000  d15 0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d16 000000000000120c  d17 0000000000001208
09-17 12:41:52.192: I/DEBUG(177):     d18 0000000000000004  d19 5c5c5c5c5c5c5c5c
09-17 12:41:52.192: I/DEBUG(177):     d20 c02e000000000000  d21 c024000000000000
09-17 12:41:52.192: I/DEBUG(177):     d22 0000000000000000  d23 c02e000000000000
09-17 12:41:52.192: I/DEBUG(177):     d24 0001000200020001  d25 0006000500040003
09-17 12:41:52.192: I/DEBUG(177):     d26 0000000000000000  d27 0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d28 3ff0000000000000  d29 0000000000000000
09-17 12:41:52.192: I/DEBUG(177):     d30 3ff0000000000000  d31 4024000000000000
09-17 12:41:52.192: I/DEBUG(177):     scr 80000012
09-17 12:41:52.192: I/DEBUG(177): backtrace:
09-17 12:41:52.192: I/DEBUG(177):     #00  pc 00022fd8  /system/lib/libc.so (strlen+83)
09-17 12:41:52.192: I/DEBUG(177):     #01  pc 00002017  /data/app-lib/com.testing.encryption-1/libcrypto-jni.so (Java_org_openssl_LibCrypto_PKCS5PBKDF2HMACSHA1+88)
09-17 12:41:52.192: I/DEBUG(177):     #02  pc 0001dbcc  /system/lib/libdvm.so (dvmPlatformInvoke+112)
09-17 12:41:52.192: I/DEBUG(177):     #03  pc 0004e123  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
09-17 12:41:52.192: I/DEBUG(177):     #04  pc 00026fe0  /system/lib/libdvm.so
09-17 12:41:52.192: I/DEBUG(177):     #05  pc 0002dfa0  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
09-17 12:41:52.192: I/DEBUG(177):     #06  pc 0002b638  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
09-17 12:41:52.192: I/DEBUG(177):     #07  pc 00060581  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
09-17 12:41:52.192: I/DEBUG(177):     #08  pc 000605a5  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
09-17 12:41:52.192: I/DEBUG(177):     #09  pc 0005528b  /system/lib/libdvm.so
09-17 12:41:52.192: I/DEBUG(177):     #10  pc 0000d170  /system/lib/libc.so (__thread_entry+72)
09-17 12:41:52.192: I/DEBUG(177):     #11  pc 0000d308  /system/lib/libc.so (pthread_create+240)
09-17 12:41:52.192: I/DEBUG(177): stack:
09-17 12:41:52.192: I/DEBUG(177):          78242a90  41f1d2e8  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242a94  415924b1  /system/lib/libdvm.so
09-17 12:41:52.192: I/DEBUG(177):          78242a98  41f1d2e8  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242a9c  76b0ff48  [anon:libc_malloc]
09-17 12:41:52.192: I/DEBUG(177):          78242aa0  415f8564  /system/lib/libdvm.so
09-17 12:41:52.192: I/DEBUG(177):          78242aa4  78242abc  [stack:17295]
09-17 12:41:52.192: I/DEBUG(177):          78242aa8  41f1d2e8  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242aac  4159252d  /system/lib/libdvm.so
09-17 12:41:52.192: I/DEBUG(177):          78242ab0  00000000  
09-17 12:41:52.192: I/DEBUG(177):          78242ab4  4159434f  /system/lib/libdvm.so
09-17 12:41:52.192: I/DEBUG(177):          78242ab8  76b105a8  [anon:libc_malloc]
09-17 12:41:52.192: I/DEBUG(177):          78242abc  76b0ff48  [anon:libc_malloc]
09-17 12:41:52.192: I/DEBUG(177):          78242ac0  00000000  
09-17 12:41:52.192: I/DEBUG(177):          78242ac4  00000000  
09-17 12:41:52.192: I/DEBUG(177):          78242ac8  76b105a8  [anon:libc_malloc]
09-17 12:41:52.192: I/DEBUG(177):          78242acc  756ea013  /data/app-lib/com.testing.encryption-1/libcrypto-jni.so (Java_org_openssl_LibCrypto_PKCS5PBKDF2HMACSHA1+84)
09-17 12:41:52.192: I/DEBUG(177):     #00  78242ad0  00000000  
09-17 12:41:52.192: I/DEBUG(177):          ........  ........
09-17 12:41:52.192: I/DEBUG(177):     #01  78242ad0  00000000  
09-17 12:41:52.192: I/DEBUG(177):          78242ad4  fffffea0  
09-17 12:41:52.192: I/DEBUG(177):          78242ad8  41576f54  /system/lib/libdvm.so (dvmMterpStd(Thread*))
09-17 12:41:52.192: I/DEBUG(177):          78242adc  4157463c  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+188)
09-17 12:41:52.192: I/DEBUG(177):          78242ae0  59d00005  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242ae4  41f1d368  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242ae8  00000000  
09-17 12:41:52.192: I/DEBUG(177):          78242aec  00000010  
09-17 12:41:52.192: I/DEBUG(177):          78242af0  760f3e9c  
09-17 12:41:52.192: I/DEBUG(177):          78242af4  6d819aa8  /dev/ashmem/dalvik-LinearAlloc (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242af8  76b0ff48  [anon:libc_malloc]
09-17 12:41:52.192: I/DEBUG(177):          78242afc  00000004  
09-17 12:41:52.192: I/DEBUG(177):          78242b00  760f3e8c  
09-17 12:41:52.192: I/DEBUG(177):          78242b04  41566bd0  /system/lib/libdvm.so (dvmPlatformInvoke+116)
09-17 12:41:52.192: I/DEBUG(177):     #02  78242b08  0000000a  
09-17 12:41:52.192: I/DEBUG(177):          78242b0c  44700009  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242b10  760f3e78  
09-17 12:41:52.192: I/DEBUG(177):          78242b14  00000001  
09-17 12:41:52.192: I/DEBUG(177):          78242b18  751586e3  /data/dalvik-cache/data@app@com.testing.encryption-1.apk@classes.dex
09-17 12:41:52.192: I/DEBUG(177):          78242b1c  41f119c8  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242b20  422a0220  /dev/ashmem/dalvik-heap (deleted)
09-17 12:41:52.192: I/DEBUG(177):          78242b24  41597127  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+402)
09-17 12:41:52.202: I/DEBUG(177): memory near r2:
09-17 12:41:52.202: I/DEBUG(177):     76b0ff28 00000000 00000000 00000008 40289a24  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff38 760ece20 76b2b74c 00000000 0000045b  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff48 6e56d80c 760f3e78 6d829a70 753d0000  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff58 00000000 00000000 78242c40 00000000  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff68 78242c94 0000000c 00000000 41566d40  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff78 00000000 00000000 6c87d070 760f0300  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff88 00000000 00000000 00000001 00004000  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff98 00000000 76b2aef8 41566d40 4156bc00  
09-17 12:41:52.202: I/DEBUG(177):     76b0ffa8 00000000 4156fcfc 4156fd70 4156fc20  
09-17 12:41:52.202: I/DEBUG(177):     76b0ffb8 4156fc40 4156fc9c 00000000 00000000  
09-17 12:41:52.202: I/DEBUG(177):     76b0ffc8 757379a8 00000028 00000000 00000000  
09-17 12:41:52.202: I/DEBUG(177):     76b0ffd8 00000000 00000000 00001ffc 415f891c  
09-17 12:41:52.202: I/DEBUG(177):     76b0ffe8 415ff0e0 6d4bc110 00000003 76b103a0  
09-17 12:41:52.202: I/DEBUG(177):     76b0fff8 00000001 00000040 00000200 00000000  
09-17 12:41:52.202: I/DEBUG(177):     76b10008 00000003 6eaba158 6eaba158 00000005  
09-17 12:41:52.202: I/DEBUG(177):     76b10018 6eab515c 6d7f94a8 3d6e32cb 66083608  
09-17 12:41:52.202: I/DEBUG(177): memory near r5:
09-17 12:41:52.202: I/DEBUG(177):     76b10588 d1d1d1d1 d1d1d1d1 d1d1d1d1 d1d1d1d1  
09-17 12:41:52.202: I/DEBUG(177):     76b10598 d1d1d1d1 d1d1d1d1 00000000 0000002b  
09-17 12:41:52.202: I/DEBUG(177):     76b105a8 415f14b8 00000000 0000000c 76b0ff48  
09-17 12:41:52.202: I/DEBUG(177):     76b105b8 00000000 00000000 7572f5c0 0056293b  
09-17 12:41:52.202: I/DEBUG(177):     76b105c8 00000028 000002f3 e8028230 010203a0  
09-17 12:41:52.202: I/DEBUG(177):     76b105d8 00010202 09060d30 8648862a 01010df7  
09-17 12:41:52.202: I/DEBUG(177):     76b105e8 30000505 300b3163 55030609 02130604  
09-17 12:41:52.202: I/DEBUG(177):     76b105f8 21315355 03061f30 130a0455 65685418  
09-17 12:41:52.202: I/DEBUG(177):     76b10608 206f4720 64646144 72472079 2c70756f  
09-17 12:41:52.202: I/DEBUG(177):     76b10618 636e4920 3031312e 5503062f 28130b04  
09-17 12:41:52.202: I/DEBUG(177):     76b10628 44206f47 79646461 616c4320 32207373  
09-17 12:41:52.202: I/DEBUG(177):     76b10638 72654320 69666974 69746163 41206e6f  
09-17 12:41:52.202: I/DEBUG(177):     76b10648 6f687475 79746972 0d171e30 36303430  
09-17 12:41:52.202: I/DEBUG(177):     76b10658 37313932 30323630 330d175a 32363034  
09-17 12:41:52.202: I/DEBUG(177):     76b10668 30373139 5a303236 0b316330 03060930  
09-17 12:41:52.202: I/DEBUG(177):     76b10678 13060455 31535502 061f3021 0a045503  
09-17 12:41:52.202: I/DEBUG(177): memory near r7:
09-17 12:41:52.202: I/DEBUG(177):     41f1d2d8 00000000 0000000a 00610065 00000023  
09-17 12:41:52.202: I/DEBUG(177):     41f1d2e8 415ff800 00000000 00000008 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d2f8 64cf580a 3f820d53 0079006d 0000002b  
09-17 12:41:52.202: I/DEBUG(177):     41f1d308 415ff800 00000000 00000010 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d318 fccbd45d 3b45f596 fccbd45d 3b45f596  
09-17 12:41:52.202: I/DEBUG(177):     41f1d328 006d0078 0000002b 41f124e0 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d338 00000000 00000000 00000000 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d348 00000000 00000000 00000000 0000002b  
09-17 12:41:52.202: I/DEBUG(177):     41f1d358 415ff800 00000000 00000010 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d368 00000000 00000000 00000000 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d378 4161aef8 00000049 41ed5ad0 00000001  
09-17 12:41:52.202: I/DEBUG(177):     41f1d388 00000067 0000003b 415ff950 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d398 00000010 00000000 00000000 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d3a8 00000000 00000000 00000000 00000000  
09-17 12:41:52.202: I/DEBUG(177):     41f1d3b8 00000000 00000000 00000048 00000022  
09-17 12:41:52.202: I/DEBUG(177):     41f1d3c8 415ff0e0 00000000 41ed5ad0 00000000  
09-17 12:41:52.202: I/DEBUG(177): memory near r8:
09-17 12:41:52.202: I/DEBUG(177):     78242af0 760f3e9c 6d819aa8 76b0ff48 00000004  
09-17 12:41:52.202: I/DEBUG(177):     78242b00 760f3e8c 41566bd0 0000000a 44700009  
09-17 12:41:52.202: I/DEBUG(177):     78242b10 760f3e78 00000001 751586e3 41f119c8  
09-17 12:41:52.202: I/DEBUG(177):     78242b20 422a0220 41597127 760f3e78 751586de  
09-17 12:41:52.202: I/DEBUG(177):     78242b30 756e9fbf 76b0ff58 00000000 00000000  
09-17 12:41:52.202: I/DEBUG(177):     78242b40 00000000 00000000 00000000 40169384  
09-17 12:41:52.202: I/DEBUG(177):     78242b50 78242bd4 00000000 415e75bd 00000000  
09-17 12:41:52.202: I/DEBUG(177):     78242b60 00000000 78242b48 00000000 00000002  
09-17 12:41:52.202: I/DEBUG(177):     78242b70 00000034 75189861 76b102b4 4159a9a3  
09-17 12:41:52.202: I/DEBUG(177):     78242b80 415f3c74 41f118d0 00000000 00000020  
09-17 12:41:52.202: I/DEBUG(177):     78242b90 00000020 41ec8008 00000001 00000020  
09-17 12:41:52.202: I/DEBUG(177):     78242ba0 415f81f0 754217ec 422a0220 41f1d358  
09-17 12:41:52.202: I/DEBUG(177):     78242bb0 ffffffff 41f1d358 00000000 00000008  
09-17 12:41:52.202: I/DEBUG(177):     78242bc0 00000008 41ec8008 00000001 00000008  
09-17 12:41:52.202: I/DEBUG(177):     78242bd0 415f81f0 754000b8 422a0220 41f119c8  
09-17 12:41:52.202: I/DEBUG(177):     78242be0 ffffffff 41f119c8 41548320 415bc19d  
09-17 12:41:52.202: I/DEBUG(177): memory near r9:
09-17 12:41:52.202: I/DEBUG(177):     760f3e5c 760f3eac 6eda9974 760f3ea0 74fc577e  
09-17 12:41:52.202: I/DEBUG(177):     760f3e6c 6d819aa8 00000000 00000000 7d900001  
09-17 12:41:52.202: I/DEBUG(177):     760f3e7c 00000000 59d00005 0000000a 44700009  
09-17 12:41:52.202: I/DEBUG(177):     760f3e8c 760f3ed0 74f15e36 6d829a70 74fc577e  
09-17 12:41:52.202: I/DEBUG(177):     760f3e9c 00000000 6d63f460 41f119c8 41f1d2e8  
09-17 12:41:52.202: I/DEBUG(177):     760f3eac 0000000a 41f1d358 41f1d2c0 00000000  
09-17 12:41:52.202: I/DEBUG(177):     760f3ebc 760f3f14 74f1328e 6d819e30 74f15e36  
09-17 12:41:52.202: I/DEBUG(177):     760f3ecc 00000000 41f1d2c0 74f15f28 41eed8f8  
09-17 12:41:52.202: I/DEBUG(177):     760f3edc 00000000 00000000 41f11990 00000000  
09-17 12:41:52.202: I/DEBUG(177):     760f3eec 00000000 0000001e 41f20c38 422df278  
09-17 12:41:52.202: I/DEBUG(177):     760f3efc 4227ff28 760f3f50 74f14dba 6d8188f8  
09-17 12:41:52.202: I/DEBUG(177):     760f3f0c 74f1328e 00000000 422eb620 00000000  
09-17 12:41:52.202: I/DEBUG(177):     760f3f1c 422df278 41eef720 41f20c38 41f0de90  
09-17 12:41:52.202: I/DEBUG(177):     760f3f2c 41f1fe30 00000000 422920d8 4227ff28  
09-17 12:41:52.202: I/DEBUG(177):     760f3f3c 760f3f80 74f0cab0 6d819508 74f14dba  
09-17 12:41:52.202: I/DEBUG(177):     760f3f4c 00000000 00000001 422ecd10 00000000  
09-17 12:41:52.202: I/DEBUG(177): memory near sl:
09-17 12:41:52.202: I/DEBUG(177):     76b0ff38 760ece20 76b2b74c 00000000 0000045b  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff48 6e56d80c 760f3e78 6d829a70 753d0000  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff58 00000000 00000000 78242c40 00000000  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff68 78242c94 0000000c 00000000 41566d40  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff78 00000000 00000000 6c87d070 760f0300  
09-17 12:41:52.202: I/DEBUG(177):     76b0ff88 00000000 00000000 00000001 00004000  
09-17 12:41:52.212: I/DEBUG(177):     76b0ff98 00000000 76b2aef8 41566d40 4156bc00  
09-17 12:41:52.212: I/DEBUG(177):     76b0ffa8 00000000 4156fcfc 4156fd70 4156fc20  
09-17 12:41:52.212: I/DEBUG(177):     76b0ffb8 4156fc40 4156fc9c 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     76b0ffc8 757379a8 00000028 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     76b0ffd8 00000000 00000000 00001ffc 415f891c  
09-17 12:41:52.212: I/DEBUG(177):     76b0ffe8 415ff0e0 6d4bc110 00000003 76b103a0  
09-17 12:41:52.212: I/DEBUG(177):     76b0fff8 00000001 00000040 00000200 00000000  
09-17 12:41:52.212: I/DEBUG(177):     76b10008 00000003 6eaba158 6eaba158 00000005  
09-17 12:41:52.212: I/DEBUG(177):     76b10018 6eab515c 6d7f94a8 3d6e32cb 66083608  
09-17 12:41:52.212: I/DEBUG(177):     76b10028 a36248d8 5c5413f2 5924f6ef f45e5983  
09-17 12:41:52.212: I/DEBUG(177): memory near fp:
09-17 12:41:52.212: I/DEBUG(177):     78242b04 41566bd0 0000000a 44700009 760f3e78  
09-17 12:41:52.212: I/DEBUG(177):     78242b14 00000001 751586e3 41f119c8 422a0220  
09-17 12:41:52.212: I/DEBUG(177):     78242b24 41597127 760f3e78 751586de 756e9fbf  
09-17 12:41:52.212: I/DEBUG(177):     78242b34 76b0ff58 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     78242b44 00000000 00000000 40169384 78242bd4  
09-17 12:41:52.212: I/DEBUG(177):     78242b54 00000000 415e75bd 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     78242b64 78242b48 00000000 00000002 00000034  
09-17 12:41:52.212: I/DEBUG(177):     78242b74 75189861 76b102b4 4159a9a3 415f3c74  
09-17 12:41:52.212: I/DEBUG(177):     78242b84 41f118d0 00000000 00000020 00000020  
09-17 12:41:52.212: I/DEBUG(177):     78242b94 41ec8008 00000001 00000020 415f81f0  
09-17 12:41:52.212: I/DEBUG(177):     78242ba4 754217ec 422a0220 41f1d358 ffffffff  
09-17 12:41:52.212: I/DEBUG(177):     78242bb4 41f1d358 00000000 00000008 00000008  
09-17 12:41:52.212: I/DEBUG(177):     78242bc4 41ec8008 00000001 00000008 415f81f0  
09-17 12:41:52.212: I/DEBUG(177):     78242bd4 754000b8 422a0220 41f119c8 ffffffff  
09-17 12:41:52.212: I/DEBUG(177):     78242be4 41f119c8 41548320 415bc19d 415f3c74  
09-17 12:41:52.212: I/DEBUG(177):     78242bf4 41ef2208 760f3ea0 00000008 41f119c8  
09-17 12:41:52.212: I/DEBUG(177): memory near ip:
09-17 12:41:52.212: I/DEBUG(177):     756ecfc4 75639798 75638b10 75638ccc 40128c01  
09-17 12:41:52.212: I/DEBUG(177):     756ecfd4 756392a8 75639774 75638e88 75639014  
09-17 12:41:52.212: I/DEBUG(177):     756ecfe4 4013df85 75641480 756411c4 4012a091  
09-17 12:41:52.212: I/DEBUG(177):     756ecff4 4013c840 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed004 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed014 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed024 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed034 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed044 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed054 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed064 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed074 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed084 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed094 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed0a4 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     756ed0b4 00000000 00000000 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177): memory near sp:
09-17 12:41:52.212: I/DEBUG(177):     78242ab0 00000000 4159434f 76b105a8 76b0ff48  
09-17 12:41:52.212: I/DEBUG(177):     78242ac0 00000000 00000000 76b105a8 756ea013  
09-17 12:41:52.212: I/DEBUG(177):     78242ad0 00000000 fffffea0 41576f54 4157463c  
09-17 12:41:52.212: I/DEBUG(177):     78242ae0 59d00005 41f1d368 00000000 00000010  
09-17 12:41:52.212: I/DEBUG(177):     78242af0 760f3e9c 6d819aa8 76b0ff48 00000004  
09-17 12:41:52.212: I/DEBUG(177):     78242b00 760f3e8c 41566bd0 0000000a 44700009  
09-17 12:41:52.212: I/DEBUG(177):     78242b10 760f3e78 00000001 751586e3 41f119c8  
09-17 12:41:52.212: I/DEBUG(177):     78242b20 422a0220 41597127 760f3e78 751586de  
09-17 12:41:52.212: I/DEBUG(177):     78242b30 756e9fbf 76b0ff58 00000000 00000000  
09-17 12:41:52.212: I/DEBUG(177):     78242b40 00000000 00000000 00000000 40169384  
09-17 12:41:52.212: I/DEBUG(177):     78242b50 78242bd4 00000000 415e75bd 00000000  
09-17 12:41:52.212: I/DEBUG(177):     78242b60 00000000 78242b48 00000000 00000002  
09-17 12:41:52.212: I/DEBUG(177):     78242b70 00000034 75189861 76b102b4 4159a9a3  
09-17 12:41:52.212: I/DEBUG(177):     78242b80 415f3c74 41f118d0 00000000 00000020  
09-17 12:41:52.212: I/DEBUG(177):     78242b90 00000020 41ec8008 00000001 00000020  
09-17 12:41:52.212: I/DEBUG(177):     78242ba0 415f81f0 754217ec 422a0220 41f1d358  
09-17 12:41:52.212: I/DEBUG(177): code around pc:
09-17 12:41:52.212: I/DEBUG(177):     4013dfb8 b31a2b01 0f04f013 800af000 3b04f851  
09-17 12:41:52.212: I/DEBUG(177):     4013dfc8 3c01f1a3 0c03ea2c 3c80f01c 8033f040  
09-17 12:41:52.212: I/DEBUG(177):     4013dfd8 2302e8f1 f040f891 3c01f1a2 0c02ea2c  
09-17 12:41:52.212: I/DEBUG(177):     4013dfe8 3c80f01c 800ff040 3c01f1a3 0c03ea2c  
09-17 12:41:52.212: I/DEBUG(177):     4013dff8 3c80f01c 801ff040 bfeaf7ff 0000eba1  
09-17 12:41:52.212: I/DEBUG(177):     4013e008 0001f1a0 eba14770 ea5f0000 f040434c  
09-17 12:41:52.212: I/DEBUG(177):     4013e018 f0808009 ea5f800a f0400c4c f1a08009  
09-17 12:41:52.212: I/DEBUG(177):     4013e028 47700005 0008f1a0 f1a04770 47700007  
09-17 12:41:52.212: I/DEBUG(177):     4013e038 0006f1a0 eba14770 ea5f0000 f040434c  
09-17 12:41:52.212: I/DEBUG(177):     4013e048 f0808009 ea5f800a f0400c4c f1a08009  
09-17 12:41:52.212: I/DEBUG(177):     4013e058 47700001 0004f1a0 f1a04770 47700003  
09-17 12:41:52.212: I/DEBUG(177):     4013e068 0002f1a0 bf004770 1e0cb510 4807da02  
09-17 12:41:52.212: I/DEBUG(177):     4013e078 e0034478 d904429c 44784805 f7ef2100  
09-17 12:41:52.212: I/DEBUG(177):     4013e088 e8bdfcc5 f7f14010 bf00bb91 0001f03c  
09-17 12:41:52.212: I/DEBUG(177):     4013e098 0001f050 b508429a 4805d904 44784903  
09-17 12:41:52.212: I/DEBUG(177):     4013e0a8 fcb4f7ef 4008e8bd ba52f01a 000138ee  
09-17 12:41:52.212: I/DEBUG(177): code around lr:
09-17 12:41:52.212: I/DEBUG(177):     756e9ff8 9005682b 599b9904 47981c28 9904682b  
09-17 12:41:52.212: I/DEBUG(177):     756ea008 59db1c06 22001c28 1c074798 f7ff1c20  
09-17 12:41:52.222: I/DEBUG(177):     756ea018 9b0eeaf0 1c011c3a 9b079300 93011c20  
09-17 12:41:52.222: I/DEBUG(177):     756ea028 93029b05 f7ff1c33 682aeaea 009b23aa  
09-17 12:41:52.222: I/DEBUG(177):     756ea038 58d31c28 1c229906 682b4798 00b626c0  
09-17 12:41:52.222: I/DEBUG(177):     756ea048 1c28599c 9a05990f 47a02300 1c28682b  
09-17 12:41:52.222: I/DEBUG(177):     756ea058 599c9904 23001c3a b00947a0 b5f0bdf0  
09-17 12:41:52.222: I/DEBUG(177):     756ea068 9207b08b 93056802 009b23a9 990758d3  
09-17 12:41:52.222: I/DEBUG(177):     756ea078 1c052200 682b4798 00b626ab 599b1c04  
09-17 12:41:52.222: I/DEBUG(177):     756ea088 99111c28 682b4798 00bf27b8 59db9008  
09-17 12:41:52.222: I/DEBUG(177):     756ea098 99111c28 47982200 9006682b 599b9905  
09-17 12:41:52.222: I/DEBUG(177):     756ea0a8 47981c28 9905682b 59db2200 1c289009  
09-17 12:41:52.222: I/DEBUG(177):     756ea0b8 1c074798 f7ff1c20 1c06ea9c ea32f7ff  
09-17 12:41:52.222: I/DEBUG(177):     756ea0c8 1c3a9b10 93009001 1c319b08 93021c20  
09-17 12:41:52.222: I/DEBUG(177):     756ea0d8 26c09b06 930300b6 f7ff9b09 682aea96  
09-17 12:41:52.222: I/DEBUG(177):     756ea0e8 009b23aa 58d31c28 1c229907 682b4798  
09-17 12:41:52.372: I/BootReceiver(595): Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
09-17 12:41:52.382: I/ActivityManager(595): Process com.testing.encryption (pid 17238) has died.
09-17 12:41:52.012:A/libc(17238):0x00000000(代码=1)处的致命信号11(SIGSEGV),线程17295(线程-453)
09-17 12:41:52.072:I/DEBUG(177):*********************************************************************
09-17 12:41:52.072:I/DEBUG(177):构建指纹:“google/razor/flo:4.4.2/KOT49H/937116:用户/释放密钥”
09-17 12:41:52.072:I/DEBUG(177):修订版:“0”

09-17 12:41:52.072:I/DEBUG(177):pid:17238,tid:17295,名称:Thread-453>>>com.testing.encryption所以崩溃的原因是在
strlen
函数中传递给JNI函数的空指针(
fault addr 00000000
告诉我们这一点),奇怪的是在某些设备上:

String a = null;
String b = a + "something";

结果是
b
被设置为
null
,但对于某些
b
被设置为“nullsomething”…

它看起来像
libcrypto jni。所以
只是OpenSSL的
libcrypto。所以
但是有一个新名称。这是正确的吗?
libcrypto jni.so
包含我的函数(如前面提到的函数)和
libcrypto.so
是原始的OpenSSL库(为android编译)。因此您有一个包装器共享对象,并链接到OpenSL库的静态版本(
libssl.a
libcrypto.a
)。是的,包装器共享库(
libcrypto-jni.so
)和OpenSSL共享库(
libcrypto.so
libssl.so
)。我从java加载这两个函数,然后使用包装器共享库的函数。不管怎么说,我已经找到了这段时间的原因。谢谢你看这个!“…OpenSSL共享库(
libcrypto.so
libssl.so
)”-这将在将来给您带来问题。安卓系统的版本通常为0.9.8左右。您已链接到版本1.0.1。它们不是二进制兼容的。您的包装器共享对象需要链接库的静态版本。问题的原因是Zypote在启动时加载0.9.8。当你的应用程序运行时,符号是根据所有已加载的0.9.8版本解析的,而不是你的1.0.1版本。@jww很有趣,谢谢分享。因此,我将转而使用静态库。
String a = null;
String b = a + "something";