summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_printf.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2017-07-20 18:54:26 +0000
committerVitaly Buka <vitalybuka@google.com>2017-07-20 18:54:26 +0000
commit47ee1da2bb2096a44a59d08172aa3e75396538e8 (patch)
tree860ebc18fbc966d8385181d5496b92f0b7798999 /lib/sanitizer_common/sanitizer_printf.cc
parent75ed905e2dc63208af04d37b782e54941e331897 (diff)
[compiler-rt] Use NOINLE to shrink stack frames
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_printf.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_printf.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/sanitizer_common/sanitizer_printf.cc b/lib/sanitizer_common/sanitizer_printf.cc
index f36eba55d..f81e15357 100644
--- a/lib/sanitizer_common/sanitizer_printf.cc
+++ b/lib/sanitizer_common/sanitizer_printf.cc
@@ -229,9 +229,11 @@ static void CallPrintfAndReportCallback(const char *str) {
PrintfAndReportCallback(str);
}
-static void SharedPrintfCodeNoBuffer(bool append_pid, char *local_buffer,
- int buffer_size, const char *format,
- va_list args) {
+static void NOINLINE SharedPrintfCodeNoBuffer(bool append_pid,
+ char *local_buffer,
+ int buffer_size,
+ const char *format,
+ va_list args) {
va_list args2;
va_copy(args2, args);
const int kLen = 16 * 1024;
@@ -286,8 +288,8 @@ static void SharedPrintfCodeNoBuffer(bool append_pid, char *local_buffer,
va_end(args2);
}
-static void SharedPrintfCode(bool append_pid, const char *format,
- va_list args) {
+static void NOINLINE SharedPrintfCode(bool append_pid, const char *format,
+ va_list args) {
// |local_buffer| is small enough not to overflow the stack and/or violate
// the stack limit enforced by TSan (-Wframe-larger-than=512). On the other
// hand, the bigger the buffer is, the more the chance the error report will