python-uncompyle6 icon indicating copy to clipboard operation
python-uncompyle6 copied to clipboard

Deparsing errors on JUMP_ABSOLUTE

Open k870611 opened this issue 6 years ago • 2 comments

Description

it gets to "272 709 JUMP_ABSOLUTE 847 'to 847'" in the instruction context and then fails right before an ELSE. "Parse error at or near `JUMP_ABSOLUTE' instruction at offset 709"

How to Reproduce

C:\Users\24131\Desktop\cscripts>uncompyle6 -o __init__.py .\dependencies\svtools\itp2baseaccess\__init__.pyc
Instruction context:
->
 272     709  JUMP_ABSOLUTE       847  'to 847'


# file .\dependencies\svtools\itp2baseaccess\__init__.pyc
# Deparsing stopped due to parse error
.\dependencies\svtools\itp2baseaccess\__init__.pyc --
# decompile failed

Expected behavior

Can decompile to py successfully

Environment

  • Uncompyle6 version: uncompyle6 3.5.0
  • Python version: Python 2.7.14
  • OS and Version: Windows7

Additional Environment or Context

I don't have source code and I disassemble Python bytecode by https://stackoverflow.com/questions/11141387/given-a-python-pyc-file-is-there-a-tool-that-let-me-view-the-bytecode/42720524 (change import dis to import xdis.std as dis) => attach(disassemble_pyc_content.txt), hope it is helps

disassemble python byte code => disassemble_pyc_content.txt

fail python context => init.txt

k870611 avatar Oct 23 '19 03:10 k870611

A couple of questions/comments

  1. Who are you? k870611 isn't descriptive.
  2. What are the circumstances by which you have come to not have the bytecode but not source code?

You can answer these questions privately if you prefer.

rocky avatar Oct 24 '19 15:10 rocky

  1. A developer
  2. I only have pyc, bytecode is decode by it, it is comes from a friend of mine, we want to know how to decode it.

k870611 avatar Oct 25 '19 00:10 k870611