X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Ftests%2Fuserprog%2Fexec-bound-3.c;h=41f1cd993cc0b347e7ce73544bf4eaf0ad2d843c;hp=67937c8ff0c8d94f70fa9052839fa60b419d6e78;hb=bd5dde3034714da175496292c92dc5a37509a311;hpb=c1257e8ecdb9f1bec7a37d366d9daac8ba1f19c0 diff --git a/src/tests/userprog/exec-bound-3.c b/src/tests/userprog/exec-bound-3.c index 67937c8..41f1cd9 100644 --- a/src/tests/userprog/exec-bound-3.c +++ b/src/tests/userprog/exec-bound-3.c @@ -14,5 +14,15 @@ test_main (void) char *p = get_bad_boundary () - 1; *p = 'a'; exec(p); + + /* Note: if this test fails to pass even with the official solutions, + it's probably because memory layout has changed and p no longer + refers to the proper page boundary. To fix the problem, uncomment + the line below to print out the boundary address. In addition, + add a printf line in load_segment to print out the address range + of each segment. From that, you'll be able to figure out how to + modify get_bad_boundary to make things work again. */ + + // msg("boundary address: 0x%x", p); fail ("should have killed process"); }