zrax / pycdc

C++ python bytecode disassembler and decompiler
GNU General Public License v3.0
2.95k stars 591 forks source link

Aligning some opcodes for Python 3.11, 3.12: LOAD_GLOBAL, LOAD_ATTR #462

Closed greenozon closed 3 months ago

greenozon commented 3 months ago

According to official documentation https://docs.python.org/3/library/dis.html#opcode-LOAD_GLOBAL https://docs.python.org/3/library/dis.html#opcode-LOAD_ATTR

greenozon commented 3 months ago

Fixes issues like vector range checkers #443 and probably some others (need to check)

greenozon commented 3 months ago

439 looks like similar root cause, exception is gone

greenozon commented 3 months ago

probably #356 (no input provided, but error output and python version 3.11 matches I guess..)

TiZCrocodile commented 3 months ago

yea you right, its my bad I added the support for LOAD_GLOBAL, but the low bit of operand indicates to push null, but always operand >>= 1 needs to happen if its 3.11+, and not only when low bit is set

TiZCrocodile commented 3 months ago

this closes all this issues about vector range in python 3.11

443 #439 #430 #418 #407 #403 #398 #389 #379 #356

im really sorry, its my fault

greenozon commented 3 months ago

don't be sorry, I"m not blaming anyone! it was some time ago in my to be PR'ed list but I got stuck on another PR (already closed as I still was not able to create some test case...) so that was the next bunch of fixes... I"m also happy to invest my time and interest into this repo community and make the product better stronger and bullet proof

kudos!