![[Android稳定性] 第029篇 [问题篇] 数组越界导致Unexpected kernel BRK exception at EL1](https://hexoimg.oss-cn-shanghai.aliyuncs.com/blog/25/4/cover_android_stability_029_1c81c82acebdd8120bce9ae2e9352245.png)
[Android稳定性] 第029篇 [问题篇] 数组越界导致Unexpected kernel BRK exception at EL1
### 文章摘要 在高低温测试中,两例设备死机问题指向charger模块。分析日志发现,问题源于`status_change_work`函数中的数组越界,可能与bitflip问题相关。解决方案建议增加兼容性代码,确保`cyclecount`值在0到800之间,防止异常值导致数组越界。
![[Android稳定性] 第021篇 [问题篇] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted](https://halo-19274848.oss-cn-shanghai.aliyuncs.com/2025/06/halo_jhqyzy1.png?x-oss-process=style/watermark&x-oss-process=image/resize,w_800,m_lfit)
[Android稳定性] 第021篇 [问题篇] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted
### 文章摘要 本文探讨了在Android系统中出现的一个内核崩溃问题,具体表现为`Kernel panic`错误,并深入分析了崩溃的原因。通过对内核日志和进程栈的解析,发现崩溃发生在`mi_binder_wait4_hook`函数中,由于栈帧指针`x29`发生`bitflip`错误,导致从错误的地址读取值,触发`__stack_chk_fail`函数,最终导致内核崩溃。文章详细介绍了如何通过分析汇编代码和进程栈来定位问题,并提出了可能的解决方案,即添加`nop`指令来防止`bitflip`问题。