dynamic_annotations.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. // Copyright 2017 The Abseil Authors.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // https://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // This file defines dynamic annotations for use with dynamic analysis tool
  15. // such as valgrind, PIN, etc.
  16. //
  17. // Dynamic annotation is a source code annotation that affects the generated
  18. // code (that is, the annotation is not a comment). Each such annotation is
  19. // attached to a particular instruction and/or to a particular object (address)
  20. // in the program.
  21. //
  22. // The annotations that should be used by users are macros in all upper-case
  23. // (e.g., ABSL_ANNOTATE_THREAD_NAME).
  24. //
  25. // Actual implementation of these macros may differ depending on the dynamic
  26. // analysis tool being used.
  27. //
  28. // This file supports the following configurations:
  29. // - Dynamic Annotations enabled (with static thread-safety warnings disabled).
  30. // In this case, macros expand to functions implemented by Thread Sanitizer,
  31. // when building with TSan. When not provided an external implementation,
  32. // dynamic_annotations.cc provides no-op implementations.
  33. //
  34. // - Static Clang thread-safety warnings enabled.
  35. // When building with a Clang compiler that supports thread-safety warnings,
  36. // a subset of annotations can be statically-checked at compile-time. We
  37. // expand these macros to static-inline functions that can be analyzed for
  38. // thread-safety, but afterwards elided when building the final binary.
  39. //
  40. // - All annotations are disabled.
  41. // If neither Dynamic Annotations nor Clang thread-safety warnings are
  42. // enabled, then all annotation-macros expand to empty.
  43. #ifndef ABSL_BASE_DYNAMIC_ANNOTATIONS_H_
  44. #define ABSL_BASE_DYNAMIC_ANNOTATIONS_H_
  45. #include <stddef.h>
  46. #include "absl/base/attributes.h"
  47. #include "absl/base/config.h"
  48. #ifdef __cplusplus
  49. #include "absl/base/macros.h"
  50. #endif
  51. // TODO(rogeeff): Remove after the backward compatibility period.
  52. #include "absl/base/internal/dynamic_annotations.h" // IWYU pragma: export
  53. // -------------------------------------------------------------------------
  54. // Decide which features are enabled.
  55. #ifdef ABSL_HAVE_THREAD_SANITIZER
  56. #define ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED 1
  57. #define ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED 1
  58. #define ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED 1
  59. #define ABSL_INTERNAL_ANNOTALYSIS_ENABLED 0
  60. #define ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED 1
  61. #else
  62. #define ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED 0
  63. #define ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED 0
  64. #define ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED 0
  65. // Clang provides limited support for static thread-safety analysis through a
  66. // feature called Annotalysis. We configure macro-definitions according to
  67. // whether Annotalysis support is available. When running in opt-mode, GCC
  68. // will issue a warning, if these attributes are compiled. Only include them
  69. // when compiling using Clang.
  70. #if defined(__clang__)
  71. #define ABSL_INTERNAL_ANNOTALYSIS_ENABLED 1
  72. #if !defined(SWIG)
  73. #define ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED 1
  74. #endif
  75. #else
  76. #define ABSL_INTERNAL_ANNOTALYSIS_ENABLED 0
  77. #endif
  78. // Read/write annotations are enabled in Annotalysis mode; disabled otherwise.
  79. #define ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED \
  80. ABSL_INTERNAL_ANNOTALYSIS_ENABLED
  81. #endif // ABSL_HAVE_THREAD_SANITIZER
  82. #ifdef __cplusplus
  83. #define ABSL_INTERNAL_BEGIN_EXTERN_C extern "C" {
  84. #define ABSL_INTERNAL_END_EXTERN_C } // extern "C"
  85. #define ABSL_INTERNAL_GLOBAL_SCOPED(F) ::F
  86. #define ABSL_INTERNAL_STATIC_INLINE inline
  87. #else
  88. #define ABSL_INTERNAL_BEGIN_EXTERN_C // empty
  89. #define ABSL_INTERNAL_END_EXTERN_C // empty
  90. #define ABSL_INTERNAL_GLOBAL_SCOPED(F) F
  91. #define ABSL_INTERNAL_STATIC_INLINE static inline
  92. #endif
  93. // -------------------------------------------------------------------------
  94. // Define race annotations.
  95. #if ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED == 1
  96. // Some of the symbols used in this section (e.g. AnnotateBenignRaceSized) are
  97. // defined by the compiler-based santizer implementation, not by the Abseil
  98. // library. Therefore they do not use ABSL_INTERNAL_C_SYMBOL.
  99. // -------------------------------------------------------------
  100. // Annotations that suppress errors. It is usually better to express the
  101. // program's synchronization using the other annotations, but these can be used
  102. // when all else fails.
  103. // Report that we may have a benign race at `pointer`, with size
  104. // "sizeof(*(pointer))". `pointer` must be a non-void* pointer. Insert at the
  105. // point where `pointer` has been allocated, preferably close to the point
  106. // where the race happens. See also ABSL_ANNOTATE_BENIGN_RACE_STATIC.
  107. #define ABSL_ANNOTATE_BENIGN_RACE(pointer, description) \
  108. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateBenignRaceSized) \
  109. (__FILE__, __LINE__, pointer, sizeof(*(pointer)), description)
  110. // Same as ABSL_ANNOTATE_BENIGN_RACE(`address`, `description`), but applies to
  111. // the memory range [`address`, `address`+`size`).
  112. #define ABSL_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) \
  113. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateBenignRaceSized) \
  114. (__FILE__, __LINE__, address, size, description)
  115. // Enable (`enable`!=0) or disable (`enable`==0) race detection for all threads.
  116. // This annotation could be useful if you want to skip expensive race analysis
  117. // during some period of program execution, e.g. during initialization.
  118. #define ABSL_ANNOTATE_ENABLE_RACE_DETECTION(enable) \
  119. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateEnableRaceDetection) \
  120. (__FILE__, __LINE__, enable)
  121. // -------------------------------------------------------------
  122. // Annotations useful for debugging.
  123. // Report the current thread `name` to a race detector.
  124. #define ABSL_ANNOTATE_THREAD_NAME(name) \
  125. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateThreadName)(__FILE__, __LINE__, name)
  126. // -------------------------------------------------------------
  127. // Annotations useful when implementing locks. They are not normally needed by
  128. // modules that merely use locks. The `lock` argument is a pointer to the lock
  129. // object.
  130. // Report that a lock has been created at address `lock`.
  131. #define ABSL_ANNOTATE_RWLOCK_CREATE(lock) \
  132. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockCreate)(__FILE__, __LINE__, lock)
  133. // Report that a linker initialized lock has been created at address `lock`.
  134. #ifdef ABSL_HAVE_THREAD_SANITIZER
  135. #define ABSL_ANNOTATE_RWLOCK_CREATE_STATIC(lock) \
  136. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockCreateStatic) \
  137. (__FILE__, __LINE__, lock)
  138. #else
  139. #define ABSL_ANNOTATE_RWLOCK_CREATE_STATIC(lock) \
  140. ABSL_ANNOTATE_RWLOCK_CREATE(lock)
  141. #endif
  142. // Report that the lock at address `lock` is about to be destroyed.
  143. #define ABSL_ANNOTATE_RWLOCK_DESTROY(lock) \
  144. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockDestroy)(__FILE__, __LINE__, lock)
  145. // Report that the lock at address `lock` has been acquired.
  146. // `is_w`=1 for writer lock, `is_w`=0 for reader lock.
  147. #define ABSL_ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) \
  148. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockAcquired) \
  149. (__FILE__, __LINE__, lock, is_w)
  150. // Report that the lock at address `lock` is about to be released.
  151. // `is_w`=1 for writer lock, `is_w`=0 for reader lock.
  152. #define ABSL_ANNOTATE_RWLOCK_RELEASED(lock, is_w) \
  153. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockReleased) \
  154. (__FILE__, __LINE__, lock, is_w)
  155. // Apply ABSL_ANNOTATE_BENIGN_RACE_SIZED to a static variable `static_var`.
  156. #define ABSL_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) \
  157. namespace { \
  158. class static_var##_annotator { \
  159. public: \
  160. static_var##_annotator() { \
  161. ABSL_ANNOTATE_BENIGN_RACE_SIZED(&static_var, sizeof(static_var), \
  162. #static_var ": " description); \
  163. } \
  164. }; \
  165. static static_var##_annotator the##static_var##_annotator; \
  166. } // namespace
  167. // Function prototypes of annotations provided by the compiler-based sanitizer
  168. // implementation.
  169. ABSL_INTERNAL_BEGIN_EXTERN_C
  170. void AnnotateRWLockCreate(const char* file, int line,
  171. const volatile void* lock);
  172. void AnnotateRWLockCreateStatic(const char* file, int line,
  173. const volatile void* lock);
  174. void AnnotateRWLockDestroy(const char* file, int line,
  175. const volatile void* lock);
  176. void AnnotateRWLockAcquired(const char* file, int line,
  177. const volatile void* lock, long is_w); // NOLINT
  178. void AnnotateRWLockReleased(const char* file, int line,
  179. const volatile void* lock, long is_w); // NOLINT
  180. void AnnotateBenignRace(const char* file, int line,
  181. const volatile void* address, const char* description);
  182. void AnnotateBenignRaceSized(const char* file, int line,
  183. const volatile void* address, size_t size,
  184. const char* description);
  185. void AnnotateThreadName(const char* file, int line, const char* name);
  186. void AnnotateEnableRaceDetection(const char* file, int line, int enable);
  187. ABSL_INTERNAL_END_EXTERN_C
  188. #else // ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED == 0
  189. #define ABSL_ANNOTATE_RWLOCK_CREATE(lock) // empty
  190. #define ABSL_ANNOTATE_RWLOCK_CREATE_STATIC(lock) // empty
  191. #define ABSL_ANNOTATE_RWLOCK_DESTROY(lock) // empty
  192. #define ABSL_ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) // empty
  193. #define ABSL_ANNOTATE_RWLOCK_RELEASED(lock, is_w) // empty
  194. #define ABSL_ANNOTATE_BENIGN_RACE(address, description) // empty
  195. #define ABSL_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) // empty
  196. #define ABSL_ANNOTATE_THREAD_NAME(name) // empty
  197. #define ABSL_ANNOTATE_ENABLE_RACE_DETECTION(enable) // empty
  198. #define ABSL_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) // empty
  199. #endif // ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED
  200. // -------------------------------------------------------------------------
  201. // Define memory annotations.
  202. #ifdef ABSL_HAVE_MEMORY_SANITIZER
  203. #include <sanitizer/msan_interface.h>
  204. #define ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \
  205. __msan_unpoison(address, size)
  206. #define ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) \
  207. __msan_allocated_memory(address, size)
  208. #else // !defined(ABSL_HAVE_MEMORY_SANITIZER)
  209. // TODO(rogeeff): remove this branch
  210. #ifdef ABSL_HAVE_THREAD_SANITIZER
  211. #define ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \
  212. do { \
  213. (void)(address); \
  214. (void)(size); \
  215. } while (0)
  216. #define ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) \
  217. do { \
  218. (void)(address); \
  219. (void)(size); \
  220. } while (0)
  221. #else
  222. #define ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) // empty
  223. #define ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) // empty
  224. #endif
  225. #endif // ABSL_HAVE_MEMORY_SANITIZER
  226. // -------------------------------------------------------------------------
  227. // Define IGNORE_READS_BEGIN/_END attributes.
  228. #if defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED)
  229. #define ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE \
  230. __attribute((exclusive_lock_function("*")))
  231. #define ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE \
  232. __attribute((unlock_function("*")))
  233. #else // !defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED)
  234. #define ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE // empty
  235. #define ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE // empty
  236. #endif // defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED)
  237. // -------------------------------------------------------------------------
  238. // Define IGNORE_READS_BEGIN/_END annotations.
  239. #if ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED == 1
  240. // Some of the symbols used in this section (e.g. AnnotateIgnoreReadsBegin) are
  241. // defined by the compiler-based implementation, not by the Abseil
  242. // library. Therefore they do not use ABSL_INTERNAL_C_SYMBOL.
  243. // Request the analysis tool to ignore all reads in the current thread until
  244. // ABSL_ANNOTATE_IGNORE_READS_END is called. Useful to ignore intentional racey
  245. // reads, while still checking other reads and all writes.
  246. // See also ABSL_ANNOTATE_UNPROTECTED_READ.
  247. #define ABSL_ANNOTATE_IGNORE_READS_BEGIN() \
  248. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreReadsBegin) \
  249. (__FILE__, __LINE__)
  250. // Stop ignoring reads.
  251. #define ABSL_ANNOTATE_IGNORE_READS_END() \
  252. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreReadsEnd) \
  253. (__FILE__, __LINE__)
  254. // Function prototypes of annotations provided by the compiler-based sanitizer
  255. // implementation.
  256. ABSL_INTERNAL_BEGIN_EXTERN_C
  257. void AnnotateIgnoreReadsBegin(const char* file, int line)
  258. ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE;
  259. void AnnotateIgnoreReadsEnd(const char* file,
  260. int line) ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE;
  261. ABSL_INTERNAL_END_EXTERN_C
  262. #elif defined(ABSL_INTERNAL_ANNOTALYSIS_ENABLED)
  263. // When Annotalysis is enabled without Dynamic Annotations, the use of
  264. // static-inline functions allows the annotations to be read at compile-time,
  265. // while still letting the compiler elide the functions from the final build.
  266. //
  267. // TODO(delesley) -- The exclusive lock here ignores writes as well, but
  268. // allows IGNORE_READS_AND_WRITES to work properly.
  269. #define ABSL_ANNOTATE_IGNORE_READS_BEGIN() \
  270. ABSL_INTERNAL_GLOBAL_SCOPED( \
  271. ABSL_INTERNAL_C_SYMBOL(AbslInternalAnnotateIgnoreReadsBegin)) \
  272. ()
  273. #define ABSL_ANNOTATE_IGNORE_READS_END() \
  274. ABSL_INTERNAL_GLOBAL_SCOPED( \
  275. ABSL_INTERNAL_C_SYMBOL(AbslInternalAnnotateIgnoreReadsEnd)) \
  276. ()
  277. ABSL_INTERNAL_STATIC_INLINE void ABSL_INTERNAL_C_SYMBOL(
  278. AbslInternalAnnotateIgnoreReadsBegin)()
  279. ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE {}
  280. ABSL_INTERNAL_STATIC_INLINE void ABSL_INTERNAL_C_SYMBOL(
  281. AbslInternalAnnotateIgnoreReadsEnd)()
  282. ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE {}
  283. #else
  284. #define ABSL_ANNOTATE_IGNORE_READS_BEGIN() // empty
  285. #define ABSL_ANNOTATE_IGNORE_READS_END() // empty
  286. #endif
  287. // -------------------------------------------------------------------------
  288. // Define IGNORE_WRITES_BEGIN/_END annotations.
  289. #if ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED == 1
  290. // Similar to ABSL_ANNOTATE_IGNORE_READS_BEGIN, but ignore writes instead.
  291. #define ABSL_ANNOTATE_IGNORE_WRITES_BEGIN() \
  292. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreWritesBegin)(__FILE__, __LINE__)
  293. // Stop ignoring writes.
  294. #define ABSL_ANNOTATE_IGNORE_WRITES_END() \
  295. ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreWritesEnd)(__FILE__, __LINE__)
  296. // Function prototypes of annotations provided by the compiler-based sanitizer
  297. // implementation.
  298. ABSL_INTERNAL_BEGIN_EXTERN_C
  299. void AnnotateIgnoreWritesBegin(const char* file, int line);
  300. void AnnotateIgnoreWritesEnd(const char* file, int line);
  301. ABSL_INTERNAL_END_EXTERN_C
  302. #else
  303. #define ABSL_ANNOTATE_IGNORE_WRITES_BEGIN() // empty
  304. #define ABSL_ANNOTATE_IGNORE_WRITES_END() // empty
  305. #endif
  306. // -------------------------------------------------------------------------
  307. // Define the ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_* annotations using the more
  308. // primitive annotations defined above.
  309. //
  310. // Instead of doing
  311. // ABSL_ANNOTATE_IGNORE_READS_BEGIN();
  312. // ... = x;
  313. // ABSL_ANNOTATE_IGNORE_READS_END();
  314. // one can use
  315. // ... = ABSL_ANNOTATE_UNPROTECTED_READ(x);
  316. #if defined(ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED)
  317. // Start ignoring all memory accesses (both reads and writes).
  318. #define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() \
  319. do { \
  320. ABSL_ANNOTATE_IGNORE_READS_BEGIN(); \
  321. ABSL_ANNOTATE_IGNORE_WRITES_BEGIN(); \
  322. } while (0)
  323. // Stop ignoring both reads and writes.
  324. #define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_END() \
  325. do { \
  326. ABSL_ANNOTATE_IGNORE_WRITES_END(); \
  327. ABSL_ANNOTATE_IGNORE_READS_END(); \
  328. } while (0)
  329. #ifdef __cplusplus
  330. // ABSL_ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads.
  331. #define ABSL_ANNOTATE_UNPROTECTED_READ(x) \
  332. absl::base_internal::AnnotateUnprotectedRead(x)
  333. namespace absl {
  334. ABSL_NAMESPACE_BEGIN
  335. namespace base_internal {
  336. template <typename T>
  337. inline T AnnotateUnprotectedRead(const volatile T& x) { // NOLINT
  338. ABSL_ANNOTATE_IGNORE_READS_BEGIN();
  339. T res = x;
  340. ABSL_ANNOTATE_IGNORE_READS_END();
  341. return res;
  342. }
  343. } // namespace base_internal
  344. ABSL_NAMESPACE_END
  345. } // namespace absl
  346. #endif
  347. #else
  348. #define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() // empty
  349. #define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_END() // empty
  350. #define ABSL_ANNOTATE_UNPROTECTED_READ(x) (x)
  351. #endif
  352. // -------------------------------------------------------------------------
  353. // Address sanitizer annotations
  354. #ifdef ABSL_HAVE_ADDRESS_SANITIZER
  355. // Describe the current state of a contiguous container such as e.g.
  356. // std::vector or std::string. For more details see
  357. // sanitizer/common_interface_defs.h, which is provided by the compiler.
  358. #include <sanitizer/common_interface_defs.h>
  359. #define ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(beg, end, old_mid, new_mid) \
  360. __sanitizer_annotate_contiguous_container(beg, end, old_mid, new_mid)
  361. #define ABSL_ADDRESS_SANITIZER_REDZONE(name) \
  362. struct { \
  363. alignas(8) char x[8]; \
  364. } name
  365. #else
  366. #define ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(beg, end, old_mid, new_mid) // empty
  367. #define ABSL_ADDRESS_SANITIZER_REDZONE(name) static_assert(true, "")
  368. #endif // ABSL_HAVE_ADDRESS_SANITIZER
  369. // -------------------------------------------------------------------------
  370. // Undefine the macros intended only for this file.
  371. #undef ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED
  372. #undef ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED
  373. #undef ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED
  374. #undef ABSL_INTERNAL_ANNOTALYSIS_ENABLED
  375. #undef ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED
  376. #undef ABSL_INTERNAL_BEGIN_EXTERN_C
  377. #undef ABSL_INTERNAL_END_EXTERN_C
  378. #undef ABSL_INTERNAL_STATIC_INLINE
  379. #endif // ABSL_BASE_DYNAMIC_ANNOTATIONS_H_