Skip to content

Commit a313277

Browse files
authored
fix #2687 (#2688)
1 parent b67f5f7 commit a313277

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/misc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ std::string backtraceString(int const maxFrames, int const first_frame) {
8383
trace_buf << "stacktrace not available on windows platforms\n";
8484
#else
8585
int const last_frame = first_frame + maxFrames;
86-
void* callstack[last_frame];
86+
std::vector<void*> callstack(last_frame);
8787
char buf[1024];
88-
int nFrames = backtrace(callstack, last_frame);
89-
char** symbols = backtrace_symbols(callstack, nFrames);
88+
int nFrames = backtrace(callstack.data(), last_frame);
89+
char** symbols = backtrace_symbols(callstack.data(), nFrames);
9090

9191
for (int i = first_frame; i < nFrames; i++) {
9292
// call

0 commit comments

Comments
 (0)