jos/user/faultnostack.c
Anish Athalye da1f8392b1 Lab 4
2018-10-08 21:32:14 -07:00

13 lines
229 B
C

// test user fault handler being called with no exception stack mapped
#include <inc/lib.h>
void _pgfault_upcall();
void
umain(int argc, char **argv)
{
sys_env_set_pgfault_upcall(0, (void*) _pgfault_upcall);
*(int*)0 = 0;
}