Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions absl/base/dynamic_annotations.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@

// Function prototypes of annotations provided by the compiler-based sanitizer
// implementation.
#pragma GCC visibility push(default)
ABSL_INTERNAL_BEGIN_EXTERN_C
void AnnotateRWLockCreate(const char* file, int line,
const volatile void* lock);
Expand All @@ -221,6 +222,7 @@ void AnnotateBenignRaceSized(const char* file, int line,
void AnnotateThreadName(const char* file, int line, const char* name);
void AnnotateEnableRaceDetection(const char* file, int line, int enable);
ABSL_INTERNAL_END_EXTERN_C
#pragma GCC visibility pop

#else // ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED == 0

Expand Down Expand Up @@ -297,12 +299,14 @@ ABSL_INTERNAL_END_EXTERN_C

// Function prototypes of annotations provided by the compiler-based sanitizer
// implementation.
#pragma GCC visibility push(default)
ABSL_INTERNAL_BEGIN_EXTERN_C
void AnnotateIgnoreReadsBegin(const char* file, int line)
ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE;
void AnnotateIgnoreReadsEnd(const char* file,
int line) ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE;
ABSL_INTERNAL_END_EXTERN_C
#pragma GCC visibility pop

#elif defined(ABSL_INTERNAL_ANNOTALYSIS_ENABLED)

Expand Down Expand Up @@ -353,10 +357,12 @@ ABSL_INTERNAL_STATIC_INLINE void ABSL_INTERNAL_C_SYMBOL(

// Function prototypes of annotations provided by the compiler-based sanitizer
// implementation.
#pragma GCC visibility push(default)
ABSL_INTERNAL_BEGIN_EXTERN_C
void AnnotateIgnoreWritesBegin(const char* file, int line);
void AnnotateIgnoreWritesEnd(const char* file, int line);
ABSL_INTERNAL_END_EXTERN_C
#pragma GCC visibility pop

#else

Expand Down
2 changes: 2 additions & 0 deletions absl/base/internal/direct_mmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@

// SYS_mmap and SYS_munmap are not defined in Android.
#ifdef __BIONIC__
#pragma GCC visibility push(default)
extern "C" void* __mmap2(void*, size_t, int, int, int, size_t);
#pragma GCC visibility pop
#if defined(__NR_mmap) && !defined(SYS_mmap)
#define SYS_mmap __NR_mmap
#endif
Expand Down
2 changes: 2 additions & 0 deletions absl/synchronization/mutex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2788,7 +2788,9 @@ void ReleasableMutexLock::Release() {
}

#ifdef ABSL_HAVE_THREAD_SANITIZER
#pragma GCC visibility push(default)
extern "C" void __tsan_read1(void* addr);
#pragma GCC visibility pop
#else
#define __tsan_read1(addr) // do nothing if TSan not enabled
#endif
Expand Down