fausturs opened a new issue, #2315:
URL: https://github.com/apache/brpc/issues/2315

   **Describe the bug (描述bug)**
   
   https://github.com/apache/brpc/blob/master/src/brpc/span.cpp#L133
   <img width="683" alt="image" 
src="https://github.com/apache/brpc/assets/25004087/c03e3ebf-d310-4de8-a026-e41384876f89";>
   
   在代码这个位置,如果是在多个bthread中调用的Span::CreateClientSpan,而他们属于同一个Span的child 
span。此时他们对brpc::Span::_next_client是存在竞态的。
   即便认为这个指针的赋值是原子的,似乎也可能导致内存泄漏。
   
   这里是有什么特殊的设计避免了竞态吗?求解答
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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.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

Reply via email to