-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
bugthe code does not work as expectedthe code does not work as expected
Description
Describe the bug (描述bug)
https://github.com/apache/brpc/blob/master/src/brpc/span.cpp#L133

在代码这个位置,如果是在多个bthread中调用的Span::CreateClientSpan,而他们属于同一个Span的child span。此时他们对brpc::Span::_next_client是存在竞态的。
即便认为这个指针的赋值是原子的,似乎也可能导致内存泄漏。
这里是有什么特殊的设计避免了竞态吗?求解答
To Reproduce (复现方法)
Expected behavior (期望行为)
Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:
Additional context/screenshots (更多上下文/截图)
Metadata
Metadata
Assignees
Labels
bugthe code does not work as expectedthe code does not work as expected