alibaba / alibaba/AndFix

兼容测试发现 4.0.4 全跪了 其他基本正常

Open
#40 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

堆栈是这样的~
```#2042 09-30 16:15:43.223 26643 E Posix [CDS]Libcore_io_Posix-throwErrnoException, functionName: access; errno: No such file or directory
#2043 09-30 16:15:43.223 26643 E Posix [CDS]Libcore_io_Posix-throwErrnoException, functionName: remove; errno: No such file or directory
#2044 09-30 16:15:43.246 26643 E AndFix setup error: dexProtoGetParameterCount_fnPtr
#2045 09-30 16:15:43.246 26643 E Posix [CDS]Libcore_io_Posix-throwErrnoException, functionName: access; errno: No such file or directory
#2046 09-30 16:15:43.247 26643 E Posix [CDS]Libcore_io_Posix-throwErrnoException, functionName: access; errno: No such file or directory```

主要错误都是这句 =》 #2044 09-30 16:15:43.246 26643 E AndFix
**setup error: dexProtoGetParameterCount_fnPtr**
应该就是拿不到这货的函数指针~

然后跟了一下源码

```
dexProtoGetParameterCount_fnPtr = dvm_dlsym(dvm_hand,
apilevel > 10 ?
"_Z25dexProtoGetParameterCountPK8DexProto" :
"dexProtoGetParameterCount");
```

4.0.4 取的应该是 _Z25dexProtoGetParameterCountPK8DexProto 查阅了aosp源码 里面只有 dexProtoGetParameterCount 这个方法的定义,没有找到_Z25dexProtoGetParameterCountPK8DexProto
在setup 里面有大量这种类似的代码,都是判断apilevel > 10 则用一个看起来比较奇怪的方法名(是链接后的函数名么?) 为什么要这么使用呢?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the setup code that calls dvm_dlsym for dexProtoGetParameterCount_fnPtr, then compare the symbol available in the AOSP source for Android 4.0.4 with the API-level condition shown in the report. Verify the lookup during the compatibility test and define done as setup completing without the reported dexProtoGetParameterCount_fnPtr error on 4.0.4.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cpp
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.