-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
压测中文加密解密 #27
Comments
需要完整的日志 比如 addr2line -e -f libc.so 999c1234234 |
一般要么你去定位地址,要么自己打日志看下具体挂在哪里。 |
java层加锁了 如果是纯英文或者符号的话 是不会出现的 今天试了下 中文混合的 就必现了 |
你是crash了? 按理说应该有详细日志。 |
不知道你测试的 中文字符是什么 我这里拿你的代码执行 for 循环没有发生crash |
有日志 : |
测试字符串:"测试中文试试ANSDFJKdkf3493945990-.,./" |
我用这个字符跑到现在 还拼接了一些字符 我这里没有崩溃。跑了几分钟都没跑完。 |
看你的日志里有 你查下这个地址是什么代码 0000000000007da0 |
现在似乎有10分钟过去了 。。。还没跑完这个test。 |
我这出现异常的是8.1.0的设备 使用6.0的也没出现 |
奇怪了。。。。。 我这里没有8.0设备。。。 |
我整个8.1 的虚拟机测试一下 。不过我虚拟机只能 x86 的。 |
使用的是cmake |
那是系统内置的so,不要去定位这个so。 |
嗯 复现奔溃了吗 |
没 实在是奇怪 |
这就奇怪了 我这是必现 但是每次奔溃后的backtrace 信息不一样 如何分析定位呢 |
看样你只能 猜代码报错位置,加日志,看挂在哪里。 |
I also have same problem with my Galaxy S7 android 8.0 (ARM) also I can't run it on emulator (x86 android 11) it stop with error below: my NDK Version is r13b |
fault addr changes every time: eg.: |
Sorry about hearing what you encountered. |
If you built with obfuscator, I recommand you what disable obfuscator and retry it. |
im sorry for being suspicious of your library, that was my mistake. that happens because of my own code. |
It's ok. Im very glad to hear you find out. |
I had written a README : How to locate where native crash at? |
Sorry ever one, AES is no longer supported. |
奔溃信息:A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 5529 (JVMTI Agent thr), pid 5368
压测方式:
private void test() {
for (int i = 0; i < 1000000; i++) {
long start = SystemClock.currentThreadTimeMillis();
String initstr = edit.getText().toString();
String one = strings[random.nextInt(10)];
String two = strings[random.nextInt(10)];
initstr = initstr.concat(one).concat(two);
String encode = AESEncrypt.encode(SecondActivity.this, initstr);
String decode = AESEncrypt.decode(SecondActivity.this, encode);
if (!initstr.equals(decode)) {
// YLog.e(TAG, "解密出錯:initstr:" + initstr + "----decode:" + decode);
Log.e(TAG, "解密出錯:initstr:" + initstr + "----decode:" + decode);
}
long end = SystemClock.currentThreadTimeMillis();
Log.e(TAG, "initstr:" + initstr + "----encode:" + encode+ "----decode:" + decode+"---耗时:" + (end - start));
// Log.e(TAG, "initstr:" + initstr + "----encode:" + encode+ "---耗时:" + (end - start));
}
使用中文字符串压测,奔溃必现
The text was updated successfully, but these errors were encountered: