brpc icon indicating copy to clipboard operation
brpc copied to clipboard

size parameter of AnnotateBenignRaceSized should be typed size_t instead of long

Open wudisheng opened this issue 3 years ago • 1 comments

Describe the bug (描述bug) AnnotateBenignRaceSized defined in butil/third_party/dynamic_annotations/dynamic_annotations.h has a parameter long size, while most modern libraries declaring it as size_t size (e.g. abseil-cpp, glog, etc.).

The mismatch causes a linking failure in TSAN mode.

To Reproduce (复现方法) For example, building a binary with brpc (and enable glog replacement) in TSAN mode results in a linking failure, complaining about different declarations of AnnotateBenignRaceSized.

Expected behavior (期望行为) Successful TSAN build.

Versions (各种版本) OS: Ubuntu 22.04 Compiler: Clang 12.0.1 brpc: 1.2.0 protobuf: 21.1

Additional context/screenshots (更多上下文/截图) Pending.

wudisheng avatar Sep 21 '22 18:09 wudisheng

I want to work on this.

haseeb-xd avatar Sep 26 '22 11:09 haseeb-xd

I want to work on this issue please assign me this issue

VirendraYadav1234 avatar Jan 13 '23 05:01 VirendraYadav1234

i want to work on this issue please assign me

Divyansh200102 avatar Oct 08 '23 04:10 Divyansh200102

please review the pr @chenBright

Divyansh200102 avatar Oct 08 '23 14:10 Divyansh200102