Skip to content

Commit

Permalink
Add tsan annotation to static variable when checking if vlog is on.
Browse files Browse the repository at this point in the history
  • Loading branch information
pateldeev committed Feb 6, 2023
1 parent f545ff5 commit 6757104
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/glog/vlog_is_on.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
#define VLOG_IS_ON(verboselevel) \
__extension__ \
({ static @ac_google_namespace@::SiteFlag vlocal__ = {NULL, NULL, 0, NULL}; \
GLOG_IFDEF_THREAD_SANITIZER( \
AnnotateBenignRaceSized(__FILE__, __LINE__, &vlocal__, sizeof(@ac_google_namespace@::SiteFlag), "")); \
@ac_google_namespace@::int32 verbose_level__ = (verboselevel); \
(vlocal__.level == NULL ? @ac_google_namespace@::InitVLOG3__(&vlocal__, &FLAGS_v, \
__FILE__, verbose_level__) : *vlocal__.level >= verbose_level__); \
Expand Down

0 comments on commit 6757104

Please sign in to comment.