mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 10:26:59 +00:00
Kernel V3.0.0
This commit is contained in:
12
src/kernel/userland/crash.c
Normal file
12
src/kernel/userland/crash.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "syscall.h"
|
||||
|
||||
int main() {
|
||||
const char* msg = "Attempting to crash via null dereference...\n";
|
||||
sys_write(1, msg, 45);
|
||||
|
||||
// Null pointer dereference
|
||||
volatile int* p = (int*)0;
|
||||
*p = 123;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user