300 lines
6.9 KiB
Text
300 lines
6.9 KiB
Text
NAME=pyc load version39
|
|
FILE=bins/pyc/py39.pyc
|
|
CMDS=<<EOF
|
|
iI~machine
|
|
EOF
|
|
EXPECT=<<EOF
|
|
machine Python v3.9.0 VM (rev 3a819e5c9d3feae85762ae87cebf55f9c8d2b526)
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc load version38
|
|
FILE=bins/pyc/py38.pyc
|
|
CMDS=<<EOF
|
|
iI~machine
|
|
EOF
|
|
EXPECT=<<EOF
|
|
machine Python v3.8.0 VM (rev 5d714034866ce1e9f89dc141fe4cc0b50cf20a8e)
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc load version37
|
|
FILE=bins/pyc/py37.pyc
|
|
CMDS=<<EOF
|
|
iI~machine
|
|
EOF
|
|
EXPECT=<<EOF
|
|
machine Python v3.7.0 VM (rev ae1f6af15f3e4110616801e235873e47fd7d1977)
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc load version36
|
|
FILE=bins/pyc/py36.pyc
|
|
CMDS=<<EOF
|
|
iI~machine
|
|
EOF
|
|
EXPECT=<<EOF
|
|
machine Python v3.6.0 VM (rev 5c4568a05a0a62b5947c55f68f9f2ecfb90a4f12)
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc load version27
|
|
FILE=bins/pyc/py27.pyc
|
|
CMDS=<<EOF
|
|
iI~machine
|
|
EOF
|
|
EXPECT=<<EOF
|
|
machine Python 2.7a2+ VM (rev edfed0e32cedf3b84c6e999052486a750a3f5bee)
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc 3.7 symbols
|
|
FILE=bins/pyc/py37.pyc
|
|
CMDS=<<EOF
|
|
is~?Human
|
|
EOF
|
|
EXPECT=<<EOF
|
|
9
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc 3.9 sections
|
|
FILE=bins/pyc/py37.pyc
|
|
CMDS=<<EOF
|
|
iS~Bat
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00001f0d 0x2a 0x00001f0d 0x2a 0x0 ---- module_.Bat
|
|
0x00001f5f 0xa 0x00001f5f 0xa 0x0 ---- module_.Bat.__init
|
|
0x00001fca 0x8 0x00001fca 0x8 0x0 ---- module_.Bat.say
|
|
0x00002037 0x4 0x00002037 0x4 0x0 ---- module_.Bat.sonar
|
|
0x00002103 0x1c 0x00002103 0x1c 0x0 ---- module_.Batman
|
|
0x00002143 0x44 0x00002143 0x44 0x0 ---- module_.Batman.__init
|
|
0x00002235 0x4 0x00002235 0x4 0x0 ---- module_.Batman.sing
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc 3.7 sections
|
|
FILE=bins/pyc/py37.pyc
|
|
CMDS=<<EOF
|
|
iS~Bat
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00001f0d 0x2a 0x00001f0d 0x2a 0x0 ---- module_.Bat
|
|
0x00001f5f 0xa 0x00001f5f 0xa 0x0 ---- module_.Bat.__init
|
|
0x00001fca 0x8 0x00001fca 0x8 0x0 ---- module_.Bat.say
|
|
0x00002037 0x4 0x00002037 0x4 0x0 ---- module_.Bat.sonar
|
|
0x00002103 0x1c 0x00002103 0x1c 0x0 ---- module_.Batman
|
|
0x00002143 0x44 0x00002143 0x44 0x0 ---- module_.Batman.__init
|
|
0x00002235 0x4 0x00002235 0x4 0x0 ---- module_.Batman.sing
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc 3.7 maps
|
|
FILE=bins/pyc/py37.pyc
|
|
CMDS=<<EOF
|
|
oml
|
|
EOF
|
|
EXPECT=<<EOF
|
|
1 fd: 3 +0x00000000 0x00000000 * 0x00002be5 r-x
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc 3.7 entry
|
|
FILE=bins/pyc/py37.pyc
|
|
CMDS=<<EOF
|
|
ie~program
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0000002a 0x0000002a ---------- ---------- program
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc 3.9 disasm
|
|
FILE=bins/pyc/py39.pyc
|
|
CMDS=<<EOF
|
|
pd 10
|
|
EOF
|
|
EXPECT=<<EOF
|
|
;-- entry0:
|
|
;-- section.module:
|
|
;-- <module>:
|
|
0x0000002e LOAD_CONST Multiline strings can be written
|
|
using three "s, and are often used
|
|
as documentation. ; [00] ---- section size 3248 named module
|
|
0x00000030 STORE_NAME __doc__
|
|
0x00000032 LOAD_CONST True
|
|
,=< 0x00000034 JUMP_IF_FALSE_OR_POP 10
|
|
| 0x00000036 LOAD_CONST False
|
|
`-> 0x00000038 POP_TOP
|
|
0x0000003a LOAD_CONST False
|
|
,=< 0x0000003c JUMP_IF_TRUE_OR_POP 18
|
|
| 0x0000003e LOAD_CONST True
|
|
`-> 0x00000040 POP_TOP
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc 3.7 disasm
|
|
FILE=bins/pyc/py37.pyc
|
|
CMDS=<<EOF
|
|
pd 10
|
|
EOF
|
|
EXPECT=<<EOF
|
|
;-- entry0:
|
|
;-- section.module:
|
|
;-- <module>:
|
|
0x0000002a LOAD_CONST Multiline strings can be written
|
|
using three "s, and are often used
|
|
as documentation. ; [00] ---- section size 3218 named module
|
|
0x0000002c STORE_NAME __doc__
|
|
0x0000002e LOAD_CONST True
|
|
,=< 0x00000030 JUMP_IF_FALSE_OR_POP 10
|
|
| 0x00000032 LOAD_CONST False
|
|
`-> 0x00000034 POP_TOP
|
|
0x00000036 LOAD_CONST False
|
|
,=< 0x00000038 JUMP_IF_TRUE_OR_POP 18
|
|
| 0x0000003a LOAD_CONST True
|
|
`-> 0x0000003c POP_TOP
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc symbols for pyc2.7
|
|
FILE=bins/pyc/py27.pyc
|
|
CMDS=<<EOF
|
|
is~hello_world
|
|
EOF
|
|
EXPECT=<<EOF
|
|
1 0x00000052 0x00000052 NONE FUNC 9 <module>.hello_world
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc disasm for 2.7
|
|
FILE=bins/pyc/py27.pyc
|
|
CMDS=<<EOF
|
|
pd 10
|
|
EOF
|
|
EXPECT=<<EOF
|
|
;-- entry0:
|
|
;-- section.module:
|
|
;-- <module>:
|
|
0x0000001e LOAD_CONSTCodeObject(hello_world) from hello.py ; [00] ---- section size 25 named module
|
|
0x00000021 MAKE_FUNCTION
|
|
0x00000024 STORE_NAME hello_world
|
|
0x00000027 LOAD_CONST 'world'
|
|
0x0000002a PRINT_ITEM
|
|
0x0000002b PRINT_NEWLINE
|
|
0x0000002c LOAD_NAME hello_world
|
|
0x0000002f CALL_FUNCTION0 positional, 0 named
|
|
0x00000032 POP_TOP
|
|
0x00000033 LOAD_CONST None
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pyc function
|
|
FILE=bins/pyc/py27.pyc
|
|
CMDS=<<EOF
|
|
aa
|
|
e scr.utf8=false
|
|
pdf
|
|
EOF
|
|
EXPECT=<<EOF
|
|
;-- section.module:
|
|
;-- <module>:
|
|
/ entry0 ();
|
|
| 0x0000001e LOAD_CONSTCodeObject(hello_world) from hello.py ; [00] ---- section size 25 named module
|
|
| 0x00000021 MAKE_FUNCTION
|
|
| 0x00000024 STORE_NAME hello_world
|
|
| 0x00000027 LOAD_CONST 'world'
|
|
| 0x0000002a PRINT_ITEM
|
|
| 0x0000002b PRINT_NEWLINE
|
|
| 0x0000002c LOAD_NAME hello_world
|
|
| 0x0000002f CALL_FUNCTION0 positional, 0 named
|
|
| 0x00000032 POP_TOP
|
|
| 0x00000033 LOAD_CONST None
|
|
\ 0x00000036 RETURN_VALUE
|
|
EOF
|
|
REGEXP_FILTER_ERR=<<EOF
|
|
free_object\ \(0\)
|
|
EOF
|
|
EXPECT_ERR=<<EOF
|
|
free_object (0)
|
|
EOF
|
|
RUN
|