From 0cd4b26663f45dd4e888e222f9b4c62bf1e92d6d Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 12 Feb 2024 18:22:58 +0000 Subject: [PATCH] limit the number of stack frames we get Signed-off-by: Yuxuan Shui --- interceptor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interceptor.c b/interceptor.c index 2251cfc8..fed0b52e 100644 --- a/interceptor.c +++ b/interceptor.c @@ -22,7 +22,7 @@ void backtrace() { int n = 0; size_t buffer_offset = 0; - while (unw_step(&cursor)) { + while (unw_step(&cursor) && n < 10) { unw_word_t ip, sp, off; unw_get_reg(&cursor, UNW_REG_IP, &ip);