Skip to content

Conversation

@2elli
Copy link
Collaborator

@2elli 2elli commented Dec 5, 2024

At some point line numbers for these versions were messed up, not sure exactly what happened. I have been trying to test more and across multiple versions so these issues don't arise again.

Fixes:

  • Line number inaccuracies for 3.11-3.13.
  • Instructions that index into the co_localsplusnames table were not being parsed correctly. Previously we recreated the table by adding varnames to cells without resolving duplicate items that may occur in both tables.

Joel Flores and others added 10 commits November 20, 2024 14:58
…n 3.13 object to a python 3.12 object since both of those versions do the same thing. Also added some stuff to fix some control flow issues in 3.13 as there are some cache instructions that mess up some targets
…he python 3.13 object to a python 3.12 object since both of those versions do the same thing. Also added some stuff to fix some control flow issues in 3.13 as there are some cache instructions that mess up some targets"

This reverts commit eaeae09.
@2elli
Copy link
Collaborator Author

2elli commented Dec 5, 2024

@rocky From my understanding, there are some tests that cover code object members like the line tables in pytest/test_std.py, but they need to be updated for newer versions. Should these be updated and integrated into make check or make check-full?

I have mostly been testing manually and with make check / make check-full. The make tests seem to not cover some cases like the line table. If this is a misunderstanding of how xdis tests should be ran on my part, some guidance on how to better test would be greatly appreciated.

@rocky
Copy link
Owner

rocky commented Dec 6, 2024

@rocky From my understanding, there are some tests that cover code object members like the line tables in pytest/test_std.py, but they need to be updated for newer versions. Should these be updated

Yes, when I run the tests I see

pytest/test_std.py::test_findlabels SKIPPED (Python 3.10 and above doesn't have branches in this code) [ 86%]

which seems clear enough what was up there.

and integrated into make check or make check-full?

Yes, please.

I have mostly been testing manually and with make check / make check-full. The make tests seem to not cover some cases like the line table. If this is a misunderstanding of how xdis tests should be ran on my part, some guidance on how to better test would be greatly appreciated.

make check and make check-full(or withremake`) is how I run them too.

Thanks for the PR and the work. Please give me a couple of days to get to this. Things have been a bit busy recently.

@rocky
Copy link
Owner

rocky commented Dec 9, 2024

Looks very good. Thanks for doing this.

"black" wants to reformat "bytecode.py", but I will do that after the merge.

Sorry for the delay. I wanted to make sure I understood what's up here.

@rocky rocky merged commit d3bc0f9 into rocky:master Dec 9, 2024
6 checks passed
@2elli
Copy link
Collaborator Author

2elli commented Dec 9, 2024

Thanks @rocky!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants