zhangqiongyu commented on code in PR #2962: URL: https://github.com/apache/brpc/pull/2962#discussion_r2065780811
########## src/brpc/rdma/block_pool.cpp: ########## @@ -378,6 +378,9 @@ void RecycleAll() { IdleNode* node = tls_idle_list; tls_idle_list = node->next; Region* r = GetRegion(node->start); + if (!r) { Review Comment: > 什么情况会触发这个bug呢?感觉只有node->start写错了的时候才有,正常不会有? 我在使用过程中发现有一例coredump,实际上除了node->start为空,g_regions[0].start == 0的时候也可能触发,我环境中看起来是后者,我加了判空规避,还在分析这玩意怎么废掉的,看起来和region_base有可能为空相关,比较偶发,当前也只发生了一次。此外,基于防御式编程的理念,这里判空在安全性和健壮性上,应该也有一定的意义。 -- 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: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org