Bump hard_max_frames to 400

This commit is contained in:
Jeremy Rifkin 2024-09-12 23:12:11 -05:00
parent 4e9f0da95f
commit f9ab949a9e
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
3 changed files with 4 additions and 4 deletions

View File

@ -1073,7 +1073,7 @@ back-end such as addr2line, for example, you can configure the library to do so.
| N/A | `CPPTRACE_UNWIND_WITH_NOTHING` | all | Unwinding is not done, stack traces will be empty. | | N/A | `CPPTRACE_UNWIND_WITH_NOTHING` | all | Unwinding is not done, stack traces will be empty. |
Some back-ends (execinfo and `CaptureStackBackTrace`) require a fixed buffer has to be created to read addresses into Some back-ends (execinfo and `CaptureStackBackTrace`) require a fixed buffer has to be created to read addresses into
while unwinding. By default the buffer can hold addresses for 200 frames (beyond the `skip` frames). This is while unwinding. By default the buffer can hold addresses for 400 frames (beyond the `skip` frames). This is
configurable with `CPPTRACE_HARD_MAX_FRAMES`. configurable with `CPPTRACE_HARD_MAX_FRAMES`.
**Symbol resolution** **Symbol resolution**
@ -1135,7 +1135,7 @@ Back-ends:
Back-end configuration: Back-end configuration:
- `CPPTRACE_BACKTRACE_PATH=<string>`: Path to libbacktrace backtrace.h, needed when compiling with clang/ - `CPPTRACE_BACKTRACE_PATH=<string>`: Path to libbacktrace backtrace.h, needed when compiling with clang/
- `CPPTRACE_HARD_MAX_FRAMES=<number>`: Some back-ends write to a fixed-size buffer. This is the size of that buffer. - `CPPTRACE_HARD_MAX_FRAMES=<number>`: Some back-ends write to a fixed-size buffer. This is the size of that buffer.
Default is `200`. Default is `400`.
- `CPPTRACE_ADDR2LINE_PATH=<string>`: Specify the absolute path to the addr2line binary for cpptrace to invoke. By - `CPPTRACE_ADDR2LINE_PATH=<string>`: Specify the absolute path to the addr2line binary for cpptrace to invoke. By
default the config script will search for a binary and use that absolute path (this is to prevent against path default the config script will search for a binary and use that absolute path (this is to prevent against path
injection). injection).

View File

@ -143,7 +143,7 @@ option(CPPTRACE_DEMANGLE_WITH_NOTHING "" OFF)
# ---- Back-end configurations ---- # ---- Back-end configurations ----
set(CPPTRACE_BACKTRACE_PATH "" CACHE STRING "Path to backtrace.h, if the compiler doesn't already know it. Check /usr/lib/gcc/x86_64-linux-gnu/*/include.") set(CPPTRACE_BACKTRACE_PATH "" CACHE STRING "Path to backtrace.h, if the compiler doesn't already know it. Check /usr/lib/gcc/x86_64-linux-gnu/*/include.")
set(CPPTRACE_HARD_MAX_FRAMES "" CACHE STRING "Hard limit on unwinding depth. Default is 200.") set(CPPTRACE_HARD_MAX_FRAMES "" CACHE STRING "Hard limit on unwinding depth. Default is 400.")
set(CPPTRACE_ADDR2LINE_PATH "" CACHE STRING "Absolute path to the addr2line executable you want to use.") set(CPPTRACE_ADDR2LINE_PATH "" CACHE STRING "Absolute path to the addr2line executable you want to use.")
option(CPPTRACE_ADDR2LINE_SEARCH_SYSTEM_PATH "" OFF) option(CPPTRACE_ADDR2LINE_SEARCH_SYSTEM_PATH "" OFF)

View File

@ -12,7 +12,7 @@ namespace detail {
#ifdef CPPTRACE_HARD_MAX_FRAMES #ifdef CPPTRACE_HARD_MAX_FRAMES
constexpr std::size_t hard_max_frames = CPPTRACE_HARD_MAX_FRAMES; constexpr std::size_t hard_max_frames = CPPTRACE_HARD_MAX_FRAMES;
#else #else
constexpr std::size_t hard_max_frames = 200; constexpr std::size_t hard_max_frames = 400;
#endif #endif
CPPTRACE_FORCE_NO_INLINE CPPTRACE_FORCE_NO_INLINE