summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/asan/asan_report.cc2
-rw-r--r--lib/asan/asan_thread.cc2
-rw-r--r--lib/asan/tests/asan_racy_double_free_test.cc4
-rw-r--r--lib/builtins/int_util.h2
-rw-r--r--lib/msan/msan_interceptors.cc2
-rw-r--r--lib/sanitizer_common/sanitizer_allocator.cc2
-rw-r--r--lib/sanitizer_common/sanitizer_bitvector.h4
-rw-r--r--lib/sanitizer_common/sanitizer_common.cc2
-rw-r--r--lib/sanitizer_common/sanitizer_posix.cc2
-rw-r--r--lib/sanitizer_common/sanitizer_posix_libcdep.cc2
-rw-r--r--lib/tsan/rtl/tsan_interface_ann.cc2
-rw-r--r--lib/tsan/rtl/tsan_interface_atomic.cc2
12 files changed, 14 insertions, 14 deletions
diff --git a/lib/asan/asan_report.cc b/lib/asan/asan_report.cc
index 1af4f7e8a..5e3bccee3 100644
--- a/lib/asan/asan_report.cc
+++ b/lib/asan/asan_report.cc
@@ -835,7 +835,7 @@ void NOINLINE __asan_set_error_report_callback(void (*callback)(const char*)) {
if (callback) {
error_message_buffer_size = 1 << 16;
error_message_buffer =
- (char*)MmapOrDie(error_message_buffer_size, __FUNCTION__);
+ (char*)MmapOrDie(error_message_buffer_size, __func__);
error_message_buffer_pos = 0;
}
}
diff --git a/lib/asan/asan_thread.cc b/lib/asan/asan_thread.cc
index 897ff2e6c..d4e098ac7 100644
--- a/lib/asan/asan_thread.cc
+++ b/lib/asan/asan_thread.cc
@@ -79,7 +79,7 @@ AsanThread *AsanThread::Create(thread_callback_t start_routine,
void *arg) {
uptr PageSize = GetPageSizeCached();
uptr size = RoundUpTo(sizeof(AsanThread), PageSize);
- AsanThread *thread = (AsanThread*)MmapOrDie(size, __FUNCTION__);
+ AsanThread *thread = (AsanThread*)MmapOrDie(size, __func__);
thread->start_routine_ = start_routine;
thread->arg_ = arg;
diff --git a/lib/asan/tests/asan_racy_double_free_test.cc b/lib/asan/tests/asan_racy_double_free_test.cc
index deeeb4f45..23240e714 100644
--- a/lib/asan/tests/asan_racy_double_free_test.cc
+++ b/lib/asan/tests/asan_racy_double_free_test.cc
@@ -7,7 +7,7 @@ void *x[N];
void *Thread1(void *unused) {
for (int i = 0; i < N; i++) {
- fprintf(stderr, "%s %d\n", __FUNCTION__, i);
+ fprintf(stderr, "%s %d\n", __func__, i);
free(x[i]);
}
return NULL;
@@ -15,7 +15,7 @@ void *Thread1(void *unused) {
void *Thread2(void *unused) {
for (int i = 0; i < N; i++) {
- fprintf(stderr, "%s %d\n", __FUNCTION__, i);
+ fprintf(stderr, "%s %d\n", __func__, i);
free(x[i]);
}
return NULL;
diff --git a/lib/builtins/int_util.h b/lib/builtins/int_util.h
index 1348b85eb..a9b595db8 100644
--- a/lib/builtins/int_util.h
+++ b/lib/builtins/int_util.h
@@ -21,7 +21,7 @@
/** \brief Trigger a program abort (or panic for kernel code). */
#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \
- __FUNCTION__)
+ __func__)
void compilerrt_abort_impl(const char *file, int line,
const char *function) __attribute__((noreturn));
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc
index 531b80cb9..727098a17 100644
--- a/lib/msan/msan_interceptors.cc
+++ b/lib/msan/msan_interceptors.cc
@@ -68,7 +68,7 @@ bool IsInInterceptorScope() {
if (offset >= 0 && __msan::flags()->report_umrs) { \
GET_CALLER_PC_BP_SP; \
(void) sp; \
- Printf("UMR in %s at offset %d inside [%p, +%d) \n", __FUNCTION__, \
+ Printf("UMR in %s at offset %d inside [%p, +%d) \n", __func__, \
offset, x, n); \
__msan::PrintWarningWithOrigin(pc, bp, \
__msan_get_origin((char *)x + offset)); \
diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc
index daaf7e1ce..c3bdd34eb 100644
--- a/lib/sanitizer_common/sanitizer_allocator.cc
+++ b/lib/sanitizer_common/sanitizer_allocator.cc
@@ -117,7 +117,7 @@ void *LowLevelAllocator::Allocate(uptr size) {
if (allocated_end_ - allocated_current_ < (sptr)size) {
uptr size_to_allocate = Max(size, GetPageSizeCached());
allocated_current_ =
- (char*)MmapOrDie(size_to_allocate, __FUNCTION__);
+ (char*)MmapOrDie(size_to_allocate, __func__);
allocated_end_ = allocated_current_ + size_to_allocate;
if (low_level_alloc_callback) {
low_level_alloc_callback((uptr)allocated_current_,
diff --git a/lib/sanitizer_common/sanitizer_bitvector.h b/lib/sanitizer_common/sanitizer_bitvector.h
index d16205a7c..48aeabd44 100644
--- a/lib/sanitizer_common/sanitizer_bitvector.h
+++ b/lib/sanitizer_common/sanitizer_bitvector.h
@@ -149,7 +149,7 @@ class TwoLevelBitVector {
l2_[i0][i1].clear();
}
bool res = l2_[i0][i1].setBit(i2);
- // Printf("%s: %zd => %zd %zd %zd; %d\n", __FUNCTION__,
+ // Printf("%s: %zd => %zd %zd %zd; %d\n", __func__,
// idx, i0, i1, i2, res);
return res;
}
@@ -173,7 +173,7 @@ class TwoLevelBitVector {
uptr i0 = idx0(idx);
uptr i1 = idx1(idx);
uptr i2 = idx2(idx);
- // Printf("%s: %zd => %zd %zd %zd\n", __FUNCTION__, idx, i0, i1, i2);
+ // Printf("%s: %zd => %zd %zd %zd\n", __func__, idx, i0, i1, i2);
return l1_[i0].getBit(i1) && l2_[i0][i1].getBit(i2);
}
diff --git a/lib/sanitizer_common/sanitizer_common.cc b/lib/sanitizer_common/sanitizer_common.cc
index 5e68c95b7..2dcfd0ccc 100644
--- a/lib/sanitizer_common/sanitizer_common.cc
+++ b/lib/sanitizer_common/sanitizer_common.cc
@@ -93,7 +93,7 @@ uptr ReadFileToBuffer(const char *file_name, char **buff,
if (internal_iserror(openrv)) return 0;
fd_t fd = openrv;
UnmapOrDie(*buff, *buff_size);
- *buff = (char*)MmapOrDie(size, __FUNCTION__);
+ *buff = (char*)MmapOrDie(size, __func__);
*buff_size = size;
// Read up to one page at a time.
read_len = 0;
diff --git a/lib/sanitizer_common/sanitizer_posix.cc b/lib/sanitizer_common/sanitizer_posix.cc
index 833b7cf3d..ae7b49988 100644
--- a/lib/sanitizer_common/sanitizer_posix.cc
+++ b/lib/sanitizer_common/sanitizer_posix.cc
@@ -178,7 +178,7 @@ void DumpProcessMap() {
MemoryMappingLayout proc_maps(/*cache_enabled*/true);
uptr start, end;
const sptr kBufSize = 4095;
- char *filename = (char*)MmapOrDie(kBufSize, __FUNCTION__);
+ char *filename = (char*)MmapOrDie(kBufSize, __func__);
Report("Process memory map follows:\n");
while (proc_maps.Next(&start, &end, /* file_offset */0,
filename, kBufSize, /* protection */0)) {
diff --git a/lib/sanitizer_common/sanitizer_posix_libcdep.cc b/lib/sanitizer_common/sanitizer_posix_libcdep.cc
index 58f343d16..b97fa78e0 100644
--- a/lib/sanitizer_common/sanitizer_posix_libcdep.cc
+++ b/lib/sanitizer_common/sanitizer_posix_libcdep.cc
@@ -105,7 +105,7 @@ void SetAlternateSignalStack() {
// TODO(glider): the mapped stack should have the MAP_STACK flag in the
// future. It is not required by man 2 sigaltstack now (they're using
// malloc()).
- void* base = MmapOrDie(kAltStackSize, __FUNCTION__);
+ void* base = MmapOrDie(kAltStackSize, __func__);
altstack.ss_sp = base;
altstack.ss_flags = 0;
altstack.ss_size = kAltStackSize;
diff --git a/lib/tsan/rtl/tsan_interface_ann.cc b/lib/tsan/rtl/tsan_interface_ann.cc
index f0931df16..76518092d 100644
--- a/lib/tsan/rtl/tsan_interface_ann.cc
+++ b/lib/tsan/rtl/tsan_interface_ann.cc
@@ -52,7 +52,7 @@ class ScopedAnnotation {
const uptr caller_pc = (uptr)__builtin_return_address(0); \
StatInc(thr, StatAnnotation); \
StatInc(thr, Stat##typ); \
- ScopedAnnotation sa(thr, __FUNCTION__, f, l, caller_pc); \
+ ScopedAnnotation sa(thr, __func__, f, l, caller_pc); \
const uptr pc = __sanitizer::StackTrace::GetCurrentPc(); \
(void)pc; \
/**/
diff --git a/lib/tsan/rtl/tsan_interface_atomic.cc b/lib/tsan/rtl/tsan_interface_atomic.cc
index a6fd481b3..87313a23b 100644
--- a/lib/tsan/rtl/tsan_interface_atomic.cc
+++ b/lib/tsan/rtl/tsan_interface_atomic.cc
@@ -35,7 +35,7 @@ using namespace __tsan; // NOLINT
if (thr->ignore_interceptors) \
return NoTsanAtomic##func(__VA_ARGS__); \
AtomicStatInc(thr, sizeof(*a), mo, StatAtomic##func); \
- ScopedAtomic sa(thr, callpc, a, mo, __FUNCTION__); \
+ ScopedAtomic sa(thr, callpc, a, mo, __func__); \
return Atomic##func(thr, pc, __VA_ARGS__); \
/**/