aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libc/print.c')
-rw-r--r--libs/libc/print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/libc/print.c b/libs/libc/print.c
index 425eb01..27048bd 100644
--- a/libs/libc/print.c
+++ b/libs/libc/print.c
@@ -233,7 +233,7 @@ void print_trace(u32 count)
} * stk;
__asm__ volatile("movl %%ebp, %0;" : "=r"(stk));
print("EBP\tEIP\n");
- for (u32 i = 0; stk && i < count; i++) {
+ for (u32 i = 0; stk && memory_readable(stk) && i < count; i++) {
printf("0x%x\t0x%x\n", stk->ebp, stk->eip);
stk = stk->ebp;
}