Skip to content

Commit

Permalink
Revert signal change
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerkaraszewski committed Jul 24, 2024
1 parent f7a9b88 commit 7f1e208
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libstuff/SSignal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ void _SSignal_StackTrace(int signum, siginfo_t *info, void *ucontext) {
int status{0};
char* front = strchr(frame[0], '(') + 1;
char* end = strchr(front, '+');
char* copy = (char*) malloc(end - front + 1);

char copy[end - front + 1]{0};
strncpy(copy, front, end - front);
char* demangled = abi::__cxa_demangle(copy, 0, 0, &status);
char* tolog = status ? copy : demangled;
Expand All @@ -229,7 +228,6 @@ void _SSignal_StackTrace(int signum, siginfo_t *info, void *ucontext) {
}
SWARN("Frame #" << i << ": " << tolog);
free(frame);
free(copy);
}

// Done.
Expand Down

0 comments on commit 7f1e208

Please sign in to comment.