* Changed behavior of `f` to only add flag if there is none * Changed behavior of `f+` to add flag in any case * Moved listing subcommands from `f` to `fl` * Moved listing subcommands from `f.` to `f.l` * Added subcommand `f.l*` to list all local flags in all functions * Listing flags at the current offset became `fl.` * Moved `f=` to `fl=` * Old `fl` (flag length) now became `fL` * Removed original `fe` commands * Old `f?` (check if flag exists) now became `fe` * Removed `fV` commands * Removed `fn` commands in favor of `fl` and `asm.flags.real=true` * Removed `fS` commands (`fSo` and `fSn`) * `fo` became `fortune` and moved from "flags" to "shell" category * Removed oldshell handlers of the `z` commands
182 lines
1.4 KiB
Text
182 lines
1.4 KiB
Text
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
|
|
!rz-ax Bxff3f0000fcff
|
|
!rz-ax 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
|