about summary refs log tree commit diff
path: root/absl/debugging/symbolize_test.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-03-26T22·15-0700
committerXiaoyi Zhang <zhangxy988@gmail.com>2018-03-27T14·30-0400
commit70b5fa948d920ccca86d143057497132f63a44f3 (patch)
tree346eb121c41c0eb1d800da2d3fa8c64ba835d442 /absl/debugging/symbolize_test.cc
parent4e2e6c5c0071e6430056a8ef0a6c8a1fe584d8ff (diff)
Changes imported from Abseil "staging" branch:
  - f2c4c517f14afa7a3fac6b35588381462f02dec3 Rollback release of algorithm benchmark. by Alex Strelnikov <strel@google.com>
  - ec8a9569ac36d58a4fff2f9fc851e5a9474d274a Change AllocInspector to ConstructorTracker by Jon Cohen <cohenjon@google.com>
  - 6f94f3d65a29b11c692948d23c0fc530f015cd53 Update WORKSPACE for C++ microbenchmarks and release algo... by Alex Strelnikov <strel@google.com>
  - 79187dd7cec821e47cdd751db71bb23be2b8cef7 Define copy assignment operator for ThrowingAllocator. by Xiaoyi Zhang <zhangxy@google.com>
  - 8bf5e1048dd7788f4bce60376f5c3992f8525d88 Fix incorrect format string used in str_cat_test.cc code,... by Jorg Brown <jorg@google.com>
  - 19c51194e6638f05cbb364c6684f14dc7ed1a323 Fix symbolize_test under sanitizers. by Derek Mauro <dmauro@google.com>
  - d68119cfb845a9d460fc3fd4aae1d2ea7d79ee21 Internal change. by Derek Mauro <dmauro@google.com>
  - 4ca54d336c7a18050c95c6c1a859f2a0530e1cde Internal change. by Shaindel Schwartz <shaindel@google.com>

GitOrigin-RevId: f2c4c517f14afa7a3fac6b35588381462f02dec3
Change-Id: If61a65d65f03b26d6776710040780ddd1c52c4de
Diffstat (limited to 'absl/debugging/symbolize_test.cc')
-rw-r--r--absl/debugging/symbolize_test.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/absl/debugging/symbolize_test.cc b/absl/debugging/symbolize_test.cc
index 8b28e5c53951..b23a8011990b 100644
--- a/absl/debugging/symbolize_test.cc
+++ b/absl/debugging/symbolize_test.cc
@@ -27,7 +27,6 @@
 #include "gtest/gtest.h"
 #include "absl/base/attributes.h"
 #include "absl/base/casts.h"
-#include "absl/base/internal/malloc_extension.h"
 #include "absl/base/internal/per_thread_tls.h"
 #include "absl/base/internal/raw_logging.h"
 #include "absl/base/optimization.h"
@@ -192,14 +191,13 @@ static const char *SymbolizeStackConsumption(void *pc, int *stack_consumed) {
 
 static int GetStackConsumptionUpperLimit() {
   // Symbolize stack consumption should be within 2kB.
-  const int kStackConsumptionUpperLimit = 2048;
-  // Account for ASan/TSan instrumentation requiring additional stack space.
-  size_t multiplier = 0;
-  if (absl::base_internal::MallocExtension::instance()->GetNumericProperty(
-          "dynamic_tool.stack_size_multiplier", &multiplier)) {
-    return kStackConsumptionUpperLimit * multiplier;
-  }
-  return kStackConsumptionUpperLimit;
+  int stack_consumption_upper_limit = 2048;
+#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
+    defined(THREAD_SANITIZER)
+  // Account for sanitizer instrumentation requiring additional stack space.
+  stack_consumption_upper_limit *= 5;
+#endif
+  return stack_consumption_upper_limit;
 }
 
 TEST(Symbolize, SymbolizeStackConsumption) {