Fix stack initialization to correctness of passing argument tests #28

Closed
td1223 wants to merge 6 commits from user-programs-stdout into user-programs
Showing only changes of commit b2764cfa0c - Show all commits

View File

@@ -571,7 +571,7 @@ setup_stack (void **esp)
{ {
success = install_page (((uint8_t *) PHYS_BASE) - PGSIZE, kpage, true); success = install_page (((uint8_t *) PHYS_BASE) - PGSIZE, kpage, true);
if (success) if (success)
*esp = PHYS_BASE - 12; *esp = PHYS_BASE;
else else
palloc_free_page (kpage); palloc_free_page (kpage);
} }