Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported opcode: SET_ADD #366

Open
BlairCooper opened this issue Jul 20, 2023 · 2 comments
Open

Unsupported opcode: SET_ADD #366

BlairCooper opened this issue Jul 20, 2023 · 2 comments

Comments

@BlairCooper
Copy link

SET_ADD opcode is not supported.

Source file (test_set_add.py.txt) contains only: newSet = {element for element in [1, 2, 3]}
Attempt to decompile results in: newSet = (1, 2, 3)()

Disassembly of compiled code attached as test_set_add.das.txt.

test_set_add.py.txt
test_set_add.das.txt

Using Python 3.11

I had a go at trying to add support for SET_ADD but pycdc isn't trying to decompile the inner/local function that contains the SET_ADD opcode. One thing I saw was that in handling the CALL opcode, when the code gets to line 475 of ASTree.cpp what is on the top of the stack is not the local function but the code seems to think it is.

At the point where CALL is handled, the stack has the tuple (1, 2, 3) and then the local function.

Full disclosure, while I have a lot of programming experience, I am new to Python, Python ByteCode and Pycdc.

@JennrCheng
Copy link

I got this problem too.

@greenozon
Copy link
Contributor

In Python 3.12 it produces another issue:

Unsupported opcode: LOAD_FAST_AND_CLEAR
# WARNING: Decompyle incomplete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants