We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Enhancement ASAN可以非常方便的帮我们发现并排查很多内存泄露、越界等问题。但是当我们使用了内存池,ASAN无法识别一个对象的边界,此时如果出现内存越界,ASAN 无法发现问题。 需要找到使用内存池也能使用ASAN发现问题的方法。
当前的内存池实现是mem_pool.h,BPFrameManager 使用了内存池。
测试:可以写一个单测来模拟mem_pool越界行为,看是否能够暴露出问题。
一些参考资料: 代码库:https://github.com/google/sanitizers ASAN的介绍文档:https://github.com/google/sanitizers/wiki/AddressSanitizer 附近会有一些相关内容 AddressSanitizerManualPoisoning Manual Memory Poisoning with ASAN Memory pool should be manually poisoned so that ASAN works with it 看起来参考这个文档,在申请内存和释放内存的时候,执行asan的posion和unposion接口就可以。
memorypool: fixed: unpoison memory for ASAN befor
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Enhancement
ASAN可以非常方便的帮我们发现并排查很多内存泄露、越界等问题。但是当我们使用了内存池,ASAN无法识别一个对象的边界,此时如果出现内存越界,ASAN 无法发现问题。
需要找到使用内存池也能使用ASAN发现问题的方法。
当前的内存池实现是mem_pool.h,BPFrameManager 使用了内存池。
测试:可以写一个单测来模拟mem_pool越界行为,看是否能够暴露出问题。
一些参考资料:
代码库:https://github.com/google/sanitizers
ASAN的介绍文档:https://github.com/google/sanitizers/wiki/AddressSanitizer 附近会有一些相关内容
AddressSanitizerManualPoisoning
Manual Memory Poisoning with ASAN
Memory pool should be manually poisoned so that ASAN works with it 看起来参考这个文档,在申请内存和释放内存的时候,执行asan的posion和unposion接口就可以。
memorypool: fixed: unpoison memory for ASAN befor
The text was updated successfully, but these errors were encountered: