PKUOS - Pintos
Pintos source browser for PKU Operating System course
Toggle main menu visibility
Main Page
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
x
y
Typedefs
b
e
f
h
i
l
m
o
p
s
t
u
v
Enumerations
Enumerator
b
c
g
i
p
q
r
s
t
u
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
src
tests
userprog
sc-boundary-3.c
Go to the documentation of this file.
1
/** Invokes a system call with the system call number positioned
2
such that its first byte is valid but the remaining bytes of
3
the number are in invalid memory. Must kill process. */
4
5
#include <
syscall-nr.h
>
6
#include "
tests/userprog/boundary.h
"
7
#include "
tests/lib.h
"
8
#include "
tests/main.h
"
9
10
void
11
test_main
(
void
)
12
{
13
char
*p =
get_bad_boundary
();
14
p--;
15
*p = 100;
16
17
/* Invoke the system call. */
18
asm
volatile
(
"movl %0, %%esp; int $0x30"
: :
"g"
(p));
19
fail
(
"should have killed process"
);
20
}
get_bad_boundary
void * get_bad_boundary(void)
Returns an address that is invalid, but the preceding bytes are all valid (the highest address in the...
Definition:
boundary.c:42
boundary.h
fail
void fail(const char *format,...)
Definition:
lib.c:40
lib.h
main.h
test_main
void test_main(void)
Invokes a system call with the system call number positioned such that its first byte is valid but th...
Definition:
sc-boundary-3.c:11
syscall-nr.h
Generated on Thu Nov 4 2021 19:31:01 for PKUOS - Pintos by
1.9.2