1 /* Invokes an exec system call with the exec string straddling a
2 page boundary such that the first byte of the string is valid
3 but the remainder of the string is in invalid memory. Must
6 #include <syscall-nr.h>
7 #include "tests/userprog/boundary.h"
9 #include "tests/main.h"
14 char *p = get_bad_boundary () - 1;
18 /* Note: if this test fails to pass even with the official solutions,
19 it's probably because memory layout has changed and p no longer
20 refers to the proper page boundary. To fix the problem, uncomment
21 the line below to print out the boundary address. In addition,
22 add a printf line in load_segment to print out the address range
23 of each segment. From that, you'll be able to figure out how to
24 modify get_bad_boundary to make things work again. */
26 // msg("boundary address: 0x%x", p);
27 fail ("should have killed process");