Comments (7)
我们没有遇到过这个问题;
提供的相关信息太少了,很难分析;
.so文件使用的我提供的吗,是否自己有修改?
有相关log或者能够重现吗?下载下来的补丁文件有校验吗? 线上用户遇到的概率有多大?
from apkdiffpatch.
.so文件是用的v1.3.6中的so,没有做过修改;
补丁文件和原文件都是md5校验之后再做的patch;
概率估算应该是万分之一,我们灰度发现了20个线上crash便停止了灰度;
我本地没能重现,问题描述中的堆栈是64位so的异常堆栈,找不到更多有用的日志了。 @sisong 能帮忙通过指令地址看看问题具体出现在什么方法上吗?
from apkdiffpatch.
使用了多线程patch吗?
假设真的是内存问题,可以考虑这样的测试方式:
- 用addr2line尝试找出源代码位置(估计不行,so文件移除了debug信息);
- 用linux下的valgrind来测试打补丁过程,从而发现可能的内存访问漏洞;
- 使用安卓的Address Sanitizer等来进行检测;
- 方便给我old.apk和补丁文件吗? 以便更好的进行上面的测试 (邮箱: [email protected] )
from apkdiffpatch.
我尝试了linux的valgrind和安卓的Address Sanitizer,都没有发现代码的内存访问问题;
可能需要你提供的用例来测试是否能重现问题了。
from apkdiffpatch.
oldApkPath: 存放在/data/data/xxx/files 目录下;
patchFilePath: diff文件是用File.createTempFile存放的;
outNewApkPath: 设置的是/data/data/xxx/files 目录下的文件
tempUncompressFilePath: 设置的是/data/data/xxx/cache下的文件
threadNum:设置固定值4,是多线程patch
@sisong 这里的参数哪里可能有什么隐患吗?我可以尝试改一下再灰度一下;
from apkdiffpatch.
看异常信息,在执行一个delete[]时访问数组超界,建议升级到v1.3.7(并开启so的symbol)看看。
目录的权限问题也有可能,建议所有文件都放到getApplicationContext().getFilesDir().getPath()或其子目录路径。
from apkdiffpatch.
开启多线程后又无数据需要压缩,造成提前释放从而引发crash
from apkdiffpatch.
Related Issues (20)
- 关于ApkNormalized的问题 HOT 4
- ApkPatch返回码 HOT 4
- a unity apk diff fail
- ZipDiff过程中对ApkNormalized文件进行差分检测错误 HOT 7
- ApkNormalized对Apk正则化之后使用7zip解压出现问题 HOT 6
- Can I use it for delta patching custom android ROMS? HOT 2
- 建议andorid release 上传maven HOT 3
- How to create diff and apply patch for android? HOT 21
- Problem with split apks (INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2) HOT 9
- 如何在Android设备上二次签名? HOT 4
- 请问下,重新签名后patch反而变大了。没有重新签名直接生成的patch是400多k,重新签名后生成的反而是1.2M。比google的archive-patcher 的patch包大,与您这边的测试结果好像不符合。使用的是v2签名的Apk HOT 11
- ps: 广告,我正在开发一个不需要重新签名的方案[sfpatcher](https://github.com/sisong/sfpatcher), HOT 3
- ApkPatch.patch return 5 HOT 3
- error patch when signed by new apksigner version?
- optimize muti-thread patch max require memory
- unexpected e_version: 65725 HOT 9
- patch fail with multi-thread HOT 2
- 你使用的那个版本的 ndk 啊? HOT 1
- Patch 过程中 4*(decompress stream memory) 这部分内存有办法降低吗?在手机设备上执行内存比较紧张? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apkdiffpatch.