From f0d6580ff5014fb35e03438e9a2d4d8ae47987de Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Wed, 22 May 2019 14:18:03 +0200 Subject: [PATCH] Stack Overflow and Underflow detected ! --- kaleid/kernel/sh/shcmds.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kaleid/kernel/sh/shcmds.c b/kaleid/kernel/sh/shcmds.c index dffa874..c65a675 100644 --- a/kaleid/kernel/sh/shcmds.c +++ b/kaleid/kernel/sh/shcmds.c @@ -205,12 +205,10 @@ error_t CmdStackOverflow(int argc, char **argv, char *cmdline) error_t CmdStackUnderflow(int argc, char **argv, char *cmdline) { - KernLog("\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n" - "\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n" - "\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n" - "\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n" - "\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n" - ); + for (int i = 0 ;; i++) { + asm volatile ("pop %rax\n"); + } + return EOK; }