Skip to content

Commit

Permalink
impl-posix: Fixup backtrace printing on panic.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Dec 11, 2024
1 parent 61e0c6d commit f5fab96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/impls/impl-posix/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Backtrace forceCaptureBacktrace() {
char **symbols = backtrace_symbols(buffer, count);

for (int i = 0; i < count; i++) {
char *symbol = symbols[i];
char const *symbol = symbols[i];
bt._frames.pushBack({
String(symbol),
String("unknown"),
Expand Down
4 changes: 2 additions & 2 deletions src/impls/impl-posix/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
void __panicHandler(Karm::PanicKind kind, char const *msg) {
fprintf(stderr, "%s: %s\n", kind == Karm::PanicKind::PANIC ? "panic" : "debug", msg);

// NOTE: We hare calling backinto the framework here, it might cause another
// NOTE: We are calling backinto the framework here, it might cause another
// panic, this is why we are keeping track of nested panics
static isize _panicDepth = 1;
static isize _panicDepth = 0;
_panicDepth++;
if (_panicDepth == 1) {
auto bt = Karm::Backtrace::capture();
Expand Down

0 comments on commit f5fab96

Please sign in to comment.