pycdc icon indicating copy to clipboard operation
pycdc copied to clipboard

Unsupported opcodes JUMP_IF_NOT_EXC_MATCH and DICT_MERGE

Open gygabrain opened this issue 2 years ago • 6 comments

Should we expect support for opcodes JUMP_IF_NOT_EXC_MATCH and DICT_MERGE in the near future?

gygabrain avatar May 07 '22 09:05 gygabrain

I also had a similar error last night, when I tried to decompile the pyc file compiled with python 3.10, the message "Unsupported opcode: BLA_BLA_BLA" appears.

I think this is an error because the pyc file that will be decoded is a bytecode file compiled with python 3.9 and above, and the opcodes that are not supported by pycdc are opcodes that just appeared in python version 3.9 and above.

so I tried reading the ASTree.cpp file and studying it, then I realized that the opcode that was printed as an error was not in the "case block" of the ASTree.cpp file.

I tried to change it a little by adding the opcodes printed in the error message into the case block (on line 1166)

case Pyc::JUMP_IF_NOT_EXC_MATCH_A:
case Pyc::RERAISE_A:

then rebuild it. I don't know what happened but it solved my problem when trying to decompile python 3.9 and above bytecode. everything is done!

karjok avatar Jun 06 '22 01:06 karjok

@karjok wow, i have to try it!

gygabrain avatar Jun 06 '22 20:06 gygabrain

I have change the ASTree.cpp file as above, eg. add case Pyc::JUMP_IF_NOT_EXC_MATCH_A: and case Pyc::RERAISE_A:. But I get the error message "Unsupported opcode: RERAISE". What can I do? If you know why, please notify me, thanks. @karjok

fishANDdog avatar Dec 06 '22 09:12 fishANDdog

I change the ASTree.cpp but still get the error Unsupported opcode: JUMP_IF_NOT_EXC_MATCH, do you have the a sample file? @karjok, thanks for the help that you can give me

nicolasvijalba avatar Dec 16 '22 22:12 nicolasvijalba

I have a new error, after advance with the code of ASTree, i get:

# Source Generated with Decompyle++
# File: conversorexcelZP.pyc (Python 3.9)

Segmentation fault

Any recommendation?

I can fix it now thanks

nicolasvijalba avatar Dec 19 '22 15:12 nicolasvijalba

Unsupported opcode: RERAISE

kursatturkay avatar Jan 07 '24 20:01 kursatturkay

Duplicate #450

zrax avatar Feb 21 '24 22:02 zrax