zhkl0228 / unidbg

Allows you to emulate an Android native library, and an experimental iOS emulation
Apache License 2.0
3.88k stars 966 forks source link

UC_ERR_READ_UNMAPPED错误 #86

Closed progzgq closed 4 years ago

progzgq commented 4 years ago

Hi 有个UC_ERR_READ_UNMAPPED错误不知道是什么原因,请大神帮忙看看:

看日志流程是找到string 构造器函数的jmethodid (0x1cb9c10d), 然后会读取0x1cb9c13d这个地址,看得出这个地址是 那个methodid地址 + 48, 但不知道这里代表着什么意思?

[16:37:29 504] DEBUG [cn.banny.unidbg.linux.android.dvm.DalvikVM] (DalvikVM$88:1845) - GetEnv vm=unicorn@0xfffe0080, env=null, version=0x10004
[16:37:29 508] DEBUG [cn.banny.unidbg.pointer.UnicornPointer] (UnicornPointer:303) - getString pointer=unicorn@0xbffff5f0, size=16, encoding=UTF-8, ret=java/lang/String
[16:37:29 509] DEBUG [cn.banny.unidbg.linux.android.dvm.DalvikVM] (DalvikVM$1:56) - FindClass env=unicorn@0xfffe09a0, className=java/lang/String, hash=0x83d61724
[16:37:29 511] DEBUG [cn.banny.unidbg.linux.android.dvm.DalvikVM] (DalvikVM$8:154) - NewGlobalRef object=unicorn@0x83d61724, dvmObject=class java/lang/String, class=class cn.banny.unidbg.linux.android.dvm.DvmClass
[16:37:29 512] DEBUG [cn.banny.unidbg.linux.android.dvm.BaseVM] (BaseVM:88) - addObject hash=0x83d61724 class:class java/lang/Class
[16:37:29 514] DEBUG [cn.banny.unidbg.linux.android.dvm.DalvikVM] (DalvikVM$10:178) - DeleteLocalRef object=unicorn@0xfffe09a0
[16:37:29 515] DEBUG [cn.banny.unidbg.pointer.UnicornPointer] (UnicornPointer:303) - getString pointer=unicorn@0xbffff5e8, size=6, encoding=UTF-8, ret=<init>
[16:37:29 515] DEBUG [cn.banny.unidbg.pointer.UnicornPointer] (UnicornPointer:303) - getString pointer=unicorn@0xbffff5e0, size=3, encoding=UTF-8, ret=()V

unicorn.UnicornException: Invalid memory read (UC_ERR_READ_UNMAPPED)
[16:37:29 515] DEBUG [cn.banny.unidbg.linux.android.dvm.DalvikVM] (DalvikVM$18:311) - GetMethodID class=unicorn@0x83d61724, methodName=<init>, args=()V
[16:37:29 517] DEBUG [cn.banny.unidbg.linux.android.dvm.DvmClass] (DvmClass:88) - getMethodID signature=java/lang/String-><init>()V, hash=0x1cb9c10d
[16:37:29 519] DEBUG [cn.banny.unidbg.arm.AbstractARMEmulator] (AbstractARMEmulator$1:55) - memory failed: address=0x1cb9c13d, size=4, value=0x0, user=null
zhkl0228 commented 4 years ago

发测试代码

progzgq commented 4 years ago

有点大,qq发你吧😁