1 // buggy program - causes an illegal software interrupt
3 int main(int argc, char** argv)
5 // this is a fake page fault. it can only be used if the DPL is 3
6 // if the DPL = 0, this causes a general prot fault, not a PF
8 asm volatile("int $14");
11 // this is a real page fault. volatile, so the compiler doesn't remove it
12 // this will cause a PF regardless of DPL, since it's a real PF.
13 //volatile int x = *((int*)0xc0000000);