chenBright opened a new pull request, #2890: URL: https://github.com/apache/brpc/pull/2890
### What problem does this PR solve? Issue Number: https://github.com/google/sanitizers/issues/189 Problem Summary: bthread需要额外适配ASan,不然会导致ASan误报。 ### What is changed and the side effects? Changed: 1. 在bthread创建、切换、销毁时,让ASan知道当前bthread的栈信息,主要用于维护[fake stack](https://github.com/google/sanitizers/wiki/AddressSanitizerUseAfterReturn)。 2. 主动对对象池中的内存进行下毒/消毒:get_object时消毒、return_object下毒,可以排查出对象被归还之后还继续被使用的问题。此外,ExecutionQueue的cancel功能在设计上允许TaskNode被归还到对象池后还能继续被使用,所以支持通过ObjectPoolWithASanPoison模板对象来禁用下毒/消毒功能。 3. 修复ASan发现的一些内存问题。 Side effects: - Performance effects(性能影响): - Breaking backward compatibility(向后兼容性): --- ### Check List: - Please make sure your changes are compilable(请确保你的更改可以通过编译). - When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试). - Please follow [Contributor Covenant Code of Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).(请遵循贡献者准则). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
