-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Python 3.10 Support #3577
Python 3.10 Support #3577
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with a couple minor things
…ing it to double The patch fixes 3.10 version extraction (3.10 == 3.1)
7c46d35
to
793909d
Compare
use "magic_int_within" to check if python version
@borzacchiello it broke tests on big-endian platform (System Z):
https://app.travis-ci.com/github/rizinorg/rizin/jobs/604321459#L4175 |
Uhm I’ll look info it this evening. I suspect that using “magic_int_within” for checking if the version is before 3.6 do not work on big-endian platforms. |
@borzacchiello it also fails on static builds, maybe easier to reproduce locally: https://github.com/rizinorg/rizin/actions/runs/5286709397/jobs/9566390877?pr=3580#step:8:694 |
#3583 should fix the regressions |
This reverts commit d9a5cf3.
Your checklist for this pull request
Detailed description
I'm adding support for Python 3.10 bytecode.
As far as I understand, the only relevant modification in 3.10 bytecode wrt 3.9 is this one, but please let me know if I am missing something:
I also refactored the way strings are detected. Now they are added in a similar way wrt sections and symbols while running "get_sections_symbols_from_code_objects".
Before this PR, the strings were added looking into the entire binary, generating bogus strings in the middle of code in some tests (in particular in py310.pyc).
I am not sure it is the cleanest way of doing it, let me know if you have a better idea :) !
Test plan
I added some tests using the file "py310.pyc" that was already in the test repo.
Related issue
related to #3130, but adds only support for 3.10 bytecode.
Thanks,
Luca