Skip to content

Control flow mis-decompile on python 2.7 #151

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

Closed
wangym5106 opened this issue Jan 23, 2018 · 1 comment
Closed

Control flow mis-decompile on python 2.7 #151

wangym5106 opened this issue Jan 23, 2018 · 1 comment
Labels
Control Flow Problem has to do with bad control-flow detection Python 2.7

Comments

@wangym5106
Copy link
Contributor

Python bytecode version: 2.7, compiled with 2.7.10
uncompyle6 71e7120 on Python 3.6.4

original code:

def func(a, b, c):
    while a:
        if b:
            continue
        return False
    return True

uncompyle6 output:

def func(a, b, c):
    while 1:
        if a:
            if b:
                pass
            continue
        return False

    return True

The output has different behavior compared to original code.

@rocky rocky added Control Flow Problem has to do with bad control-flow detection Python 2.7 labels Jan 23, 2018
@rocky
Copy link
Owner

rocky commented Jan 29, 2018

Commit 5039a71 now addresses this. https://github.com/rocky/python-uncompyle6/wiki/Fixing-Issue-%23151 gives details on how to find and fix the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Control Flow Problem has to do with bad control-flow detection Python 2.7
Projects
None yet
Development

No branches or pull requests

2 participants