KwaiAppTeam / KOOM

KOOM is an OOM killer on mobile platform by Kwai.
Other
3.15k stars 420 forks source link

[koom-native] 兼容 MTE #272

Open rabbitknight opened 5 months ago

rabbitknight commented 5 months ago

在应用接入 KOOM-native 时,发现 native leak完全无法 捕获。 对 native 的代码进行分析:打印日志如下:

2024-02-28 19:00:22.351  3764-3906  leak_monitor               E  GetLeakAllocs live before 0xb400007cf6ab5c00

指针前缀带有0xb4的标识。经排查 如果将demo target 33 API 会出现这样的分配。 见官方文档:https://source.android.com/docs/security/test/tagged-pointers?hl=zh-cn

临时解决方案,在app xml 中使用如下标记,可以临时解决。

  <application android:allowNativeHeapPointerTagging="false">
  ...
  </application>

希望尽快修复~

AndroidInternal commented 5 months ago

感谢反馈,因为我们做了分配器替换所以一直没发现这个问题,后面会修复下