Description
奔溃信息: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));
}
使用中文字符串压测,奔溃必现