Commit b1cf29bd authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

tweak symbolizer max-expected-frame-size for 32-bit

Summary:
Avoids:
```
folly/experimental/symbolizer/StackTrace.cpp:192:15: error: the pointer incremented by 68719476736 refers past the last possible element for an array in 32-bit address space containing 64-bit (8-byte) elements (max possible 536870912 elements) [-Werror,-Warray-bounds]
              normalStackFrame + kMaxExpectedStackFrameSize)) {
              ^                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Reviewed By: kennyyu, luciang

Differential Revision: D33837703

fbshipit-source-id: 0ca6b7ba6c2f76d0be3c54c9784c305125b525df
parent f4fa2a3f
...@@ -70,7 +70,12 @@ namespace { ...@@ -70,7 +70,12 @@ namespace {
// Heuristic for guessing the maximum stack frame size. This is needed to ensure // Heuristic for guessing the maximum stack frame size. This is needed to ensure
// we do not have stack corruption while walking the stack. // we do not have stack corruption while walking the stack.
constexpr uint64_t kMaxExpectedStackFrameSize = 0x1000000000; constexpr size_t kMaxExpectedStackFrameSizeLg2 = sizeof(size_t) == 8
? 36 // 64GB
: 28 // 256MB
;
constexpr size_t kMaxExpectedStackFrameSize //
= size_t(1) << kMaxExpectedStackFrameSizeLg2;
#if FOLLY_HAVE_LIBUNWIND #if FOLLY_HAVE_LIBUNWIND
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment