Skip to content
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

use randomly generate source code to test decompyle3 #170

Open
15r10nk opened this issue Apr 14, 2024 · 2 comments
Open

use randomly generate source code to test decompyle3 #170

15r10nk opened this issue Apr 14, 2024 · 2 comments

Comments

@15r10nk
Copy link

15r10nk commented Apr 14, 2024

Description

Hi, thank you for this very cool tool.
I wrote pysource-codegen to to test some of the software I wrote.
I would recommend you to use it in combination with pysource-minimize to generate minimal reproductions for the bugs.

Let me know if you are interested or if I can help you with the integration.

@rocky
Copy link
Owner

rocky commented Apr 14, 2024

Thanks for the kind words.

I am currently on my way to BlackHat Asia 2024 where I'll be speaking on decomple3

As it says in here:

We already have an infinite supply of decompilation bugs that need fixing, and an automated mechanism for finding more.

There is however a bit of time spent in narrowing code to a minimum program that fails to decompile. So it is possible that something along the lines of pysource-minimize can be useful. I will look into this more when I get back in a month or so. (I will take a vacation afterwards).

I suspect though that a really useful tool for minimizing a problem in decompilation will be more closely tied to understanding more about specifics of bytecode. For example, the code doesn't have to run, just be compilable which means syntactically valid. For example, undefined variables or referring to attributes of an object that does not exist usually okay. Having dead code is okay. None of these generally cause byte compiling to fail.

@15r10nk
Copy link
Author

15r10nk commented Apr 15, 2024

Yes, it is a good idea to start with the problems you already have.

I think the minimization should work for you, because it does exactly what you says. It minimizes the code as long as it can be compiled and reproduce your bug. It tries not to be smart about unused code or variables.

I hope this will save you some time in understanding and fixing your bugs.
Let me know about your experience and have a nice vacation.

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

No branches or pull requests

2 participants