X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Ftests%2Fuserprog%2Fboundary.c;h=ca4fb73e5a52a5470e251ed1476a991cdb9be5c5;hp=2e81df48e0beb5c75489e6bdb8c781c39b771213;hb=bd5dde3034714da175496292c92dc5a37509a311;hpb=c1257e8ecdb9f1bec7a37d366d9daac8ba1f19c0 diff --git a/src/tests/userprog/boundary.c b/src/tests/userprog/boundary.c index 2e81df4..ca4fb73 100644 --- a/src/tests/userprog/boundary.c +++ b/src/tests/userprog/boundary.c @@ -7,7 +7,10 @@ #include #include "tests/userprog/boundary.h" -static char dst[8192]; +/* Together with statements in src/lib/user/user.lds, arranges + for the following array to be at the very end of the .bss + segment (needed for get_bad_boundary below). */ +static char dst[8192] __attribute__ ((section (".testEndmem,\"aw\",@nobits#"))); /* Returns the beginning of a page. There are at least 2048 modifiable bytes on either side of the pointer returned. */ @@ -32,9 +35,9 @@ copy_string_across_boundary (const char *src) } /* Returns an address that is invalid, but the preceding bytes - * are all valid. Used to position information such that the - * first byte of the information is valid, but not all the - * information is valid. */ + * are all valid (the highest address in the bss segment). Used + * to position information such that the first byte of the + * information is valid, but not all the information is valid. */ void * get_bad_boundary (void) {