mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 19:01:31 +00:00
183 lines
1.4 KiB
Plaintext
183 lines
1.4 KiB
Plaintext
NAME=use after free - requires asan
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
0
|
|
~[[0
|
|
EOF
|
|
EXPECT=<<EOF
|
|
EOF
|
|
RUN
|
|
|
|
NAME=sum flags
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
f foo=2
|
|
f bar=4
|
|
?v bar/foo
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x2
|
|
EOF
|
|
RUN
|
|
|
|
NAME=div $$
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
?v 10/2
|
|
?v $$/2@10
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x5
|
|
0x5
|
|
EOF
|
|
RUN
|
|
|
|
NAME=div [0]
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
wv 10
|
|
?v [0]/2
|
|
?v $$/2@[0]
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x5
|
|
0x5
|
|
EOF
|
|
RUN
|
|
|
|
NAME=basic
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
?v 0x10+0x30
|
|
?v 1+3*2
|
|
?v (1+3)*2
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x40
|
|
0x7
|
|
0x8
|
|
EOF
|
|
RUN
|
|
|
|
NAME=sum
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
f a@3
|
|
?v a+3
|
|
?v a +3
|
|
?v a+ 3
|
|
?v 3 + 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x6
|
|
0x6
|
|
0x6
|
|
0x6
|
|
EOF
|
|
RUN
|
|
|
|
NAME=binary
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
?e
|
|
!rax2 Bxff3f0000fcff
|
|
!rax2 Bxff3ffcff
|
|
EOF
|
|
EXPECT=<<EOF
|
|
|
|
111111110011111100000000000000001111110011111111b
|
|
11111111001111111111110011111111b
|
|
EOF
|
|
RUN
|
|
|
|
NAME=invalid nums
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
e scr.interactive=true
|
|
s beach; s
|
|
s batch; s
|
|
s th; s
|
|
s h; s
|
|
?e
|
|
s 33o; s
|
|
s 383o; s
|
|
s 9o; s
|
|
s o; s
|
|
s 0177; s
|
|
s 0187; s
|
|
s 08; s
|
|
s 0; s
|
|
?e
|
|
s 101b; s
|
|
s 121b; s
|
|
s 3b; s
|
|
s b; s
|
|
?e
|
|
s 121t; s
|
|
s 131t; s
|
|
s 4t; s
|
|
s t; s
|
|
?e
|
|
s 1k; s
|
|
s 1.5K; s
|
|
s 2a1k; s
|
|
s bk; s
|
|
s k; s
|
|
?e
|
|
s 1m; s
|
|
s 1.5M; s
|
|
s 2a1m; s
|
|
s bm; s
|
|
s m; s
|
|
?e
|
|
s 1g; s
|
|
s 1.5G; s
|
|
s 2a1g; s
|
|
s bg; s
|
|
s g; s
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0xbeac
|
|
0xbeac
|
|
0xbeac
|
|
0xbeac
|
|
|
|
0x1b
|
|
0x1b
|
|
0x1b
|
|
0x1b
|
|
0x7f
|
|
0x7f
|
|
0x7f
|
|
0x0
|
|
|
|
0x5
|
|
0x5
|
|
0x5
|
|
0x5
|
|
|
|
0x10
|
|
0x10
|
|
0x10
|
|
0x10
|
|
|
|
0x400
|
|
0x600
|
|
0x600
|
|
0x600
|
|
0x600
|
|
|
|
0x100000
|
|
0x180000
|
|
0x180000
|
|
0x180000
|
|
0x180000
|
|
|
|
0x40000000
|
|
0x60000000
|
|
0x60000000
|
|
0x60000000
|
|
0x60000000
|
|
EOF
|
|
RUN
|