mirror of
https://github.com/SmallPond/MIT6.828_OS.git
synced 2026-04-28 12:50:48 +08:00
LAB 4 IS DONE.
This commit is contained in:
13
lab/user/buggyhello2.c
Normal file
13
lab/user/buggyhello2.c
Normal file
@@ -0,0 +1,13 @@
|
||||
// buggy hello world 2 -- pointed-to region extends into unmapped memory
|
||||
// kernel should destroy user environment in response
|
||||
|
||||
#include <inc/lib.h>
|
||||
|
||||
const char *hello = "hello, world\n";
|
||||
|
||||
void
|
||||
umain(int argc, char **argv)
|
||||
{
|
||||
sys_cputs(hello, 1024*1024);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user