enbiri / unpyc

Automatically exported from code.google.com/p/unpyc
0 stars 0 forks source link

Decompile problem with test_listComprehensions.pyc, test_tuples.pyc, test_yield.pyc on Python 2.5 #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Problem on Python 2.5
Has error on decompile at next files:
1. test_listComprehensions.pyc
(http://code.google.com/p/unpyc/source/browse/trunk/test/bytecode_2.5/test_listC
omprehensions.pyc)
2. test_tuples.pyc
(http://code.google.com/p/unpyc/source/browse/trunk/test/bytecode_2.5/test_tuple
s.pyc)
3. test_yield.pyc
(http://code.google.com/p/unpyc/source/browse/trunk/test/bytecode_2.5/test_yield
.pyc)

What is the expected output? What do you see instead?

Promlem with get source code for module "test_yield.pyc":
unpyc.Walker.ParserError: --- This code section failed: ---
0       LOAD_FAST         't'
3       JUMP_IF_FALSE     '80'
6       POP_TOP           ''
7       SETUP_LOOP        '38'
10      LOAD_GLOBAL       'inorder'
13      LOAD_FAST         't'
16      LOAD_ATTR         'left'
19      CALL_FUNCTION_1   ''
22      GET_ITER          ''
23      FOR_ITER          '37'
26      STORE_FAST        'x'
29      LOAD_FAST         'x'
32      YIELD_VALUE       ''
33      POP_TOP           ''
34      JUMP_ABSOLUTE     '23'
37_0    COME_FROM         ''
37      POP_BLOCK         ''
38_0    COME_FROM         ''
38      LOAD_FAST         't'
41      LOAD_ATTR         'label'
44      YIELD_VALUE       ''
45      POP_TOP           ''
46      SETUP_LOOP        '81'
49      LOAD_GLOBAL       'inorder'
52      LOAD_FAST         't'
55      LOAD_ATTR         'right'
58      CALL_FUNCTION_1   ''
61      GET_ITER          ''
62      FOR_ITER          '76'
65      STORE_FAST        'x'
68      LOAD_FAST         'x'
71      YIELD_VALUE       ''
72      POP_TOP           ''
73      JUMP_ABSOLUTE     '62'
76_0    COME_FROM         ''
76      POP_BLOCK         ''
77_0    COME_FROM         ''
77      JUMP_FORWARD      '81'
80_0    COME_FROM         ''
80      POP_TOP           ''
81_0    COME_FROM         ''
81      LOAD_CONST        ''
84      RETURN_VALUE      ''
Syntax error at or near `POP_TOP' token at offset 33

Promlem with get source code for module "test_listComprehensions.pyc":

unpyc.Walker.ParserError: --- This code section failed: ---
0       BUILD_LIST_0      ''
3       DUP_TOP           ''
4       STORE_FAST        '_[1]'
7       LOAD_FAST         'seq'
10      GET_ITER          ''
11      FOR_ITER          '40'
14      STORE_FAST        'subseq'
17      LOAD_FAST         'subseq'
20      GET_ITER          ''
21      FOR_ITER          '37'
24      STORE_FAST        'x'
27      LOAD_FAST         '_[1]'
30      LOAD_FAST         'x'
33      LIST_APPEND       ''
34      JUMP_ABSOLUTE     '21'
37_0    COME_FROM         ''
37      JUMP_ABSOLUTE     '11'
40_0    COME_FROM         ''
40      DELETE_FAST       '_[1]'
43      RETURN_VALUE      ''

Syntax error at or near `GET_ITER' token at offset 10

Promlem with get source code for module "test_tuples.py":
33      LOAD_CONST        (3, 4, 5)
36      ROT_TWO           ''
37      STORE_NAME        'a'
40      STORE_NAME        'b'
43      BUILD_MAP         ''
46      STORE_NAME        'x'
49      SETUP_EXCEPT      '64'
52      LOAD_NAME         'x'
55      LOAD_CONST        (1, 2, 3)
58      BINARY_SUBSCR     ''
59      POP_TOP           ''
60      POP_BLOCK         ''
61      JUMP_FORWARD      '71'
64_0    COME_FROM         ''
64      POP_TOP           ''
65      POP_TOP           ''
66      POP_TOP           ''
67      JUMP_FORWARD      '71'
70      END_FINALLY       ''
71_0    COME_FROM         ''
71_1    COME_FROM         ''
71      LOAD_CONST        42
74      LOAD_NAME         'x'
77      LOAD_CONST        (1, 2, 3)
80      STORE_SUBSCR      ''
81      LOAD_NAME         'x'
84      LOAD_CONST        (1, 2, 3)
87      BINARY_SUBSCR     ''
88      PRINT_ITEM        ''
89      PRINT_NEWLINE     ''
90      LOAD_NAME         'x'
93      LOAD_CONST        (1, 2, 3)
96      BINARY_SUBSCR     ''
97      PRINT_ITEM        ''
98      PRINT_NEWLINE     ''
99      LOAD_NAME         'x'
102     LOAD_CONST        (1, 2, 3)
105     BINARY_SUBSCR     ''
106     LOAD_NAME         'x'
109     LOAD_CONST        (1, 2, 3)
112     BINARY_SUBSCR     ''
113     COMPARE_OP        '=='
116     JUMP_IF_TRUE      '126'
119     POP_TOP           ''
120     LOAD_GLOBAL       'AssertionError'
123     RAISE_VARARGS     ''
126_0   COME_FROM         ''
126     POP_TOP           ''
127     LOAD_NAME         'x'
130     LOAD_CONST        (1, 2, 3)
133     DELETE_SUBSCR     ''
134     LOAD_CONST        ''
137     RETURN_VALUE      ''

Syntax error at or near `ROT_TWO' token at offset 36

What version of the product are you using? On what operating system?
using last version of "unpyc", WIN2003
Python 2.5.4 (r254:67916) [MSC v.1310 32 bit (Intel)] on win32

Please provide any additional information below.

other files decompile successfully (directory "test")

Original issue reported on code.google.com by artem...@gmail.com on 20 May 2009 at 1:42

GoogleCodeExporter commented 8 years ago
to artem.bz:

These days I'm trying a lot to modify sth or add some new grammer in it to make 
it
support Python verion 2.5.
And only the test_tuples.pyc file is left that can not be decompiled 
successfully.

I have emailed with the owner of this project , and I also agreed with him that
rewrite these scripts: many grammer will be added and some places will be 
simplified.

Original comment by higerinb...@gmail.com on 17 Jun 2009 at 1:41

GoogleCodeExporter commented 8 years ago
But if you use: http://www.depython.net/

You can decompyle all files...

Please author make unpyc to decompyle all pyhton versions like team 509

Original comment by mastergipy@gmail.com on 3 Dec 2009 at 3:00

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
depython.net asks money 

Original comment by onyx68...@gmail.com on 26 Jun 2010 at 2:01

GoogleCodeExporter commented 8 years ago
That's the point...

I just want a service good like depython.net but free.

If the author of unpyc update the program will be great :D

Original comment by mastergipy@gmail.com on 27 Jun 2010 at 1:15