Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Checks: >
-clang-analyzer-core.uninitialized.Assign,
clang-diagnostic-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-magic-numbers,
Expand Down
9 changes: 5 additions & 4 deletions src/common/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <execinfo.h>
#endif

#include <array>
#include <string>
#include <exception>


std::string get_backtrace() {
#ifdef __GLIBC__
void *trace[16];
const int max_trace_size = 16;
std::array<void *, max_trace_size> trace{};
int i = 0, trace_size = 0;

trace_size = backtrace(trace, 16);
char** funcNames = backtrace_symbols(trace, trace_size);

trace_size = backtrace(trace.data(), max_trace_size);
char** funcNames = backtrace_symbols(trace.data(), trace_size);
Comment thread
ranjodhsingh1729 marked this conversation as resolved.

std::string message = "\n*** Execution path***\n";
for (i = 0; i < trace_size; ++i) {
Expand Down