-
Notifications
You must be signed in to change notification settings - Fork 765
Fix MAKE_FUNCTION default args for py 3.6-3.12 #539
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
base: master
Are you sure you want to change the base?
Conversation
Compiled with the 3.4.10-alpine container
Compiled with 3.0.1 locally built container
And they changed it again on Python 3.13 |
Hi @CarrBen thanks for your contribution. Would it be possible for you to update this PR wrt py 3.12/3.13? Thanks! |
Hello @CarrBen thanks for your contribution.You can update this PR to Python3.13 version 3.13?thank you! |
@whoami730 @1111qqjwbbw I think this branch might work OK for 3.12 (though there might be some other things that don't play nice with it). For 3.13, I'm looking at updating it, I think I have a fix, but it looks like there are some other changes to CALL in 3.13 that have some wider consequences. I might raise another PR for 3.13 support rather than push here, but I'll update here with more info once I push something. |
@whoami730 @1111qqjwbbw I've set up #579 for the Python 3.13 MAKE_FUNCTION. It's a draft as it builds on top of both this PR and #538 |
DRAFT: This is stacked on top of #538 as both include changes to the same opcode
Some changes for the handling of MAKE_FUNCTION operand & arguments in py3.6-3.12 that I discovered while make some fixes to decompile a py 3.11 app. I started on this before I noticed that #391 existed, but as this PR is stacked on top of #538 it works for py 3.0 & py 3.4 too.
MAKE_FUNCTION Python 3.4 Docs
MAKE_FUNCTION Python 3.7 Docs
Summary
Tests
The
test_functions_py3
for py 3.7 was in xfail.In the previous PR, I added a new test case and updated the tokenized version, to match this the
test_functions_py3.3.7.pyc
file incompiled
was re-built from the (previously updated) source ininput
.I used the
token_dump
andpymultic
scripts for this, with a slight modification to use-alpine
containers inpymultic
.New py3.6-12 Arg Defaults for MAKE_FUNCTION
With the current
master
,pycdc
produced this output for thex7d
test case on py3.7.However, this is the input
This is because the MAKE_FUNCTION code expects individual args on the stack, but they are now on the stack inside of 0-4 tuples & kwargs indicated by the operand flag.
Stacked on top of #538
Duplicates #391
Related Issues
#507 ?
#155 ?
#138
#448 The MAKE_FUNCTION part