From f630c4e28c59d5c29f8bf9548f66567e4230e568 Mon Sep 17 00:00:00 2001 From: tmeissner Date: Sun, 24 Aug 2014 18:51:51 +0200 Subject: [PATCH] added define to provoke kernel panic when accessing the memory at that address --- c_pointers/chapter_5.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c_pointers/chapter_5.c b/c_pointers/chapter_5.c index b58a7b1..f7b4f85 100644 --- a/c_pointers/chapter_5.c +++ b/c_pointers/chapter_5.c @@ -113,6 +113,10 @@ int main(void) { } + #define KERNEL_PANIC 0x0000 + + char *mem = (int*) KERNEL_PANIC; + // standard string operations // comparing strings