lh2debug commented on PR #3140:
URL: https://github.com/apache/brpc/pull/3140#issuecomment-3500077098

   Thank you for your answer. This approach of implementing reference counting 
internally within a Span seems impractical.
   
   Because reference Counting with void* rpcz_parent_span Fails Across Bthreads:
   Raw pointers in LocalStorage cannot detect when the referenced Span is 
destroyed in another bthread. When a parent Span is deleted (after its 
reference count reaches zero), child bthreads still hold the same pointer value 
pointing to freed memory, causing use-after-free. Each Span's reference count 
only tracks its own operations and cannot prevent destruction when other 
bthreads still reference it through raw pointers.
   @yanglimingcn 


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

Reply via email to