Skip to content

Commit ec8e45b

Browse files
authored
Update HOW-TO-REPORT-A-BUG.md
1 parent 894e97a commit ec8e45b

File tree

1 file changed

+42
-47
lines changed

1 file changed

+42
-47
lines changed

HOW-TO-REPORT-A-BUG.md

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- [What to send (minimum requirements)](#what-to-send-minimum-requirements)
1111
- [What to send (additional helpful information)](#what-to-send-additional-helpful-information)
1212
- [But I don't *have* the source code!](#but-i-dont-have-the-source-code)
13-
- [But I don't *have* the source code and am incapable of figuring how to do a hand disassembly!](#but-i-dont-have-the-source-code-and-am-incapable-of-figuring-how-to-do-a-hand-disassembly)
13+
- [But I don't *have* the source code and am incapable of figuring out how to do a hand disassembly!](#but-i-dont-have-the-source-code-and-am-incapable-of-figuring-how-to-do-a-hand-disassembly)
1414
- [Narrowing the problem](#narrowing-the-problem)
1515
- [Karma](#karma)
1616
- [Confidentiality of Bug Reports](#confidentiality-of-bug-reports)
@@ -20,32 +20,32 @@
2020
TL;DR (too long; didn't read)
2121

2222
* Don't do something illegal. And don't ask me to do something illegal or help you do something illegal.
23-
* We already have an infinite supply of decompilation bugs that need fixing, and an automated mechanism for finding more. Decompilation bugs get addressed by easiness to fix and by whim. If you expect yours to be fixed ahead of those, you need to justify why. You can ask for a hand-assisted decompilation, but that is expensive and beyond what most are willing to spend. A $100 fee is needed just to look at the bytecode.
23+
* We already have an infinite supply of decompilation bugs that need fixing, and an automated mechanism for finding more. Decompilation bugs get addressed by ease to fix and by whim. If you expect yours to be fixed ahead of those, you need to justify why. You can ask for a hand-assisted decompilation, but that is expensive and beyond what most are willing to spend. A $100 fee is needed just to look at the bytecode.
2424
* When asking for help, you may be asked for what you've tried on your own first. There are plenty of sources of information about this code.
2525
* Bugs get fixed, slowly. Sometimes on the order of months or years. If you are looking for *timely* help or support, that is typically known as a _paid_ service.
26-
* Submitting a bug or issue report that is likely to get acted upon may require a bit of effort on your part to make it easy for the problem solver. If you are not willing to do that, please don't waste your or our time. Bug report may be closed with about as much thought and care as apparent in the effort to create the bug. Supporting the project however, does increase the likelihood of your issue getting noticed and acted upon.
26+
* Submitting a bug or issue report that is likely to get acted upon may require a bit of effort on your part to make it easy for the problem solver. If you are not willing to do that, please don't waste your or our time. Bug reports may be closed with about as much thought and care as apparent in the effort to create the bug. Supporting the project, however, does increase the likelihood of your issue getting noticed and acted upon.
2727

2828
# Ethics
2929

30-
Do not use this program for unethical or illegal purposes. More detestable, at least to me, is asking for help to assist you in something that might not legitimate.
30+
Do not use this program for unethical or illegal purposes. More detestable, at least to me, is asking for help to assist you in something that might not be legitimate.
3131

3232
Don't use the issue tracker for such unethical or illegal solicitations. To try to stave off illegitimate behavior, you should note that the issue tracker, the code, and bugs mentioned in that are in the open: there is no
33-
confidentiality. You may be asked about the authorship or claimed ownership of the bytecode. If I think something is not quite right, I may label the issue questionable which may make the it easier those who are looking for illegal activity.
33+
confidentiality. You may be asked about the authorship or claimed ownership of the bytecode. If I think something is not quite right, I may label the issue questionable, which may make it easier for those who are looking for illegal activity.
3434

3535

3636
# The importance of your bug report
3737

38-
For many open-source projects bugs where the expectation is that bugs are rare, reporting bugs in a *thoughtful* way can be helpful. See also [How to Ask Questions the Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html).
38+
For many open-source projects, where the expectation is that bugs are rare, reporting bugs in a *thoughtful* way can be helpful. See also [How to Ask Questions the Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html).
3939

40-
In this project though, most of the bug reports boil down to the something like: I am trying to reverse engineer some code that I am not the author/owner and that person doesn't want me to have access to. I am hitting a problem somewhere along the line which might have to do with decompilation. But it could be something else like how the bytecode was extracted, some problem in deliberately obfuscated code, or the use some kind of Python bytecode version that isn't supported by the decompiler. Gee this stuff is complicated, here's an open source project, so maybe someone there will help me figure stuff out.
40+
In this project, though, most of the bug reports boil down to something like: I am trying to reverse engineer some code that I am not the author/owner of, and that person doesn't want me to have access to. I am hitting a problem somewhere along the line, which might have to do with decompilation. But it could be something else, like how the bytecode was extracted, some problem in deliberately obfuscated code, or the use of some kind of Python bytecode version that isn't supported by the decompiler. Gee, this stuff is complicated. Here's an open source project, so maybe someone there will help me figure stuff out.
4141

42-
While you are free to report bugs, unless you sponsor the project, I may close them with about the same amount of effort spent that I think was used to open the report for them. And if you spent a considerable amount of time to create the bug report but didn't follow instructions given here and in the issue template, I am sorry in advance. Just go back, read, and follow instructions.
42+
While you are free to report bugs, unless you sponsor the project, I may close them with about the same amount of effort that I think was used to open the report for them. And if you spent a considerable amount of time creating the bug report but didn't follow the instructions given here and in the issue template, I am sorry in advance. Just go back, read, and follow instructions.
4343

44-
This project already has an infinite supply of bugs that have been narrowed to the most minimal form and where I have source code to compare against. And in the unlikely event this supply runs out, I have automated means for generating *another* infinite supply.
44+
This project already has an infinite supply of bugs that have been narrowed to the most minimal form, and I have source code to compare against. And in the unlikely event this supply runs out, I have automated means for generating *another* infinite supply.
4545

4646
The task of justifying why addressing your bug is of use to the community, and why it should be prioritized over the others, is the bug reporter's responsibility.
4747

48-
While in the abstract, I have no problem answering questions about how to read a Python traceback or install Python software, or trying to understand what is going wrong in your particular setup, I am not a paid support person and there other things I'd rather be doing with my limited volunteer time. So save us both time, effort, and aggravation: use other avenues like StackOverflow. Again, justifying why you should receive unpaid help is the help requester's responsibility.
48+
While in the abstract, I have no problem answering questions about how to read a Python traceback or install Python software, or trying to understand what is going wrong in your particular setup, I am not a paid support person, and there are other things I'd rather be doing with my limited volunteer time. So save us both time, effort, and aggravation: use other avenues like StackOverflow or ChatGPT. Again, justifying why you should receive unpaid help is the help requester's responsibility.
4949

5050

5151
# The difficulty of the problem and your bug
@@ -74,20 +74,20 @@ obfuscation.
7474
Checking if bytecode is valid is pretty simple: disassemble the code.
7575
Python comes with a disassembly module called `dis`. A prerequisite
7676
module for this package, `xdis` has a cross-python version
77-
disassembler called `pydisasm`. Using that with the `-F extended` option, generally provides a more comprehensive disassembly than is provided by other disassemblers.
77+
disassembler called `pydisasm`. Using that with the `-F extended` option generally provides a more comprehensive disassembly than is provided by other disassemblers.
7878

7979
## Semantic equivalence vs. exact source code
8080

81-
Consider how Python compiles something like "(x*y) + 5". Early on Python creates an "abstract syntax tree" (AST) for this. And this is "abstract" in the sense that unimportant, redundant or unnecessary items have been removed. Here, this means that any notion that you wrote "x+y" in parenthesis is lost, since in this context they are unneeded. Also lost is the fact that the multiplication didn't have spaces around it while the addition did. It should not come as a surprise then that the bytecode which is derived from the AST also has no notion of such possible variation. Generally this kind of thing isn't noticed since the Python community has laid out a very rigid set of formatting guidelines; and it has largely beaten the community into compliance.
81+
Consider how Python compiles something like "(x*y) + 5". Early on, Python creates an "abstract syntax tree" (AST) for this. And this is "abstract" in the sense that unimportant, redundant, or unnecessary items have been removed. Here, this means that any notion that you wrote "x+y" in parentheses is lost, since in this context they are unneeded. Also lost is the fact that the multiplication didn't have spaces around it, while the addition did. It should not come as a surprise, then, that the bytecode which is derived from the AST also has no notion of such possible variation. Generally, this kind of thing isn't noticed since the Python community has laid out a very rigid set of formatting guidelines, and it has largely beaten the community into compliance.
8282

8383
Almost all versions of Python can perform some sort of code
84-
improvement that can't be undone. In earlier versions of Python it is
84+
improvement that can't be undone. In earlier versions of Python, it is
8585
rare; in later Python versions, it is more common.
8686

8787
If the code emitted is semantically equivalent, then this isn't a bug.
8888

8989

90-
For example the code might be
90+
For example, the code might be:
9191

9292
```python
9393
if a:
@@ -113,7 +113,7 @@ else:
113113
may come out as `elif` or vice versa.
114114

115115

116-
As mentioned in the README, It is possible that Python changes what
116+
As mentioned in the README, Python may change what
117117
you write to be more efficient. For example, for:
118118

119119

@@ -150,18 +150,16 @@ The basic requirement is pretty simple:
150150

151151
Please don't put files on download services that one has to register
152152
for or can't get to by issuing a simple `curl` or `wget`. If you can't
153-
attach it to the issue, or create a github gist, then the code you are
153+
attach it to the issue or create a GitHub gist, then the code you are
154154
sending is too large.
155155

156-
Also try to narrow the bug. See below.
156+
Also, try to narrow down the bug. See below.
157157

158158
# What to send (additional helpful information)
159159

160-
Some kind folks also give the invocation they used and the output
161-
which usually includes an error message produced. This is
160+
Some kind folks also give the invocation they used and the output, which usually includes an error message produced. This is
162161
helpful. From this, I can figure out what OS you are running this on
163-
and what version of *uncompyle6* was used. Therefore, if you _don't_
164-
provide the input command and the output from that, please give:
162+
and what version of *uncompyle6* was used. Therefore, if you _don't_ provide the input command and the output from that. Please give:
165163

166164
* _uncompyle6_ version used
167165
* OS that you used this on
@@ -170,69 +168,66 @@ provide the input command and the output from that, please give:
170168

171169
## But I don't *have* the source code!
172170

173-
There is Python assembly code on parse errors, so simply by hand decompile that. To get a full disassembly, use `pydisasm` from the [xdis](https://pypi.python.org/pypi/xdis) package. Opcodes are described in the documentation for the [dis](https://docs.python.org/3.6/library/dis.html) module.
171+
There is Python assembly code on parse errors, so simply hand-decompile that. To get a full disassembly, use `pydisasm` from the [xdis](https://pypi.python.org/pypi/xdis) package. Opcodes are described in the documentation for the [dis](https://docs.python.org/3.6/library/dis.html) module.
174172

175-
### But I don't *have* the source code and am incapable of figuring how to do a hand disassembly!
173+
### But I don't *have* the source code and am incapable of figuring out how to do a hand disassembly!
176174

177175
Well, you could learn. No one is born into this world knowing how to disassemble Python bytecode. And as Richard Feynman once said, "What one fool can learn, so can another."
178176

179-
If this is too difficult, or too time consuming, or not of interest to you, then you might consider [sponsoring](https://github.com/sponsors/rocky) the project. [Crazy
180-
Compilers](http://www.crazy-compilers.com/decompyle/) offers a byte-code decompiler service for versions of Python up to 2.6. (If there are others around let me know and I'll list them here.) Don't be surprised if I ask you to pay for work (if I think the work is ethical) when you want me to work on your problem that I think isn't of interest or benefit to anyone but yourself or a small limited number of people, or I think the need is questionable.
177+
If this is too difficult, or too time-consuming, or not of interest to you, then you might consider [sponsoring](https://github.com/sponsors/rocky) the project. [Crazy
178+
Compilers (http://www.crazy-compilers.com/decompyle/) offers a byte-code decompiler service for versions of Python up to 2.6. (If there are others around, let me know and I'll list them here.) Don't be surprised if I ask you to pay for work (if I think the work is ethical) when you want me to work on your problem that I think isn't of interest or benefit to anyone but yourself or a small, limited number of people, or I think the need is questionable.
181179

182180
# Narrowing the problem
183181

184-
I don't need or want the entire source code base for the file(s) or module(s) can't be decompiled. I just need those file(s) or module(s). If there are problems in several files, file a bug report for each file.
182+
I don't need or want the entire source code base for the file(s) or module(s) that can't be decompiled. I just need those file(s) or module(s). If there are problems in several files, file a bug report for each file.
185183

186-
Python modules can get quite large, and usually decompilation problems
187-
occur in a single function or maybe the main-line code but not any of
184+
Python modules can get quite large, and usually, decompilation problems
185+
occur in a single function or maybe the main-line code, but not any of
188186
the functions or classes. So please chop down the source code by
189-
removing those parts that do to decompile properly.
187+
removing those parts that do not decompile properly.
190188

191-
By doing this, you'll probably have a better sense of what exactly is
192-
the problem. Perhaps you can find the boundary of what decompiles, and
189+
By doing this, you'll probably have a better sense of what exactly the problem is. Perhaps you can find the boundary of what decompiles and
193190
what doesn't. That is useful. Or maybe the same file will decompile
194191
properly on a neighboring version of Python. That is helpful too.
195192

196-
In sum, the more you can isolate or narrow the problem, the more
197-
likely the problem will be fixed and fixed sooner.
193+
In sum, the more you can isolate or narrow the problem, the more likely the problem will be fixed and fixed sooner.
198194

199195
# Karma
200196

201197
I realize that following the instructions given herein puts a bit of
202198
burden on the bug reporter. This is justified since it attempts to balance
203199
the burden and effort needed to fix the bug with the amount of effort to report the problem. And it attempts
204-
to balance number of would-be bug reporters with the number of bug
205-
fixers. Better bug reporters are more likely to move in the category
200+
to balance the number of would-be bug reporters with the number of bug
201+
fixers. Better bug reporters are more likely to move into the category
206202
of bug fixers.
207203

208204
The barrier to reporting a big is pretty small: all you really need is
209-
a github account, and the ability to type something after clicking
205+
a GitHub account, and the ability to type something after clicking
210206
some buttons. So the reality is that many people just don't bother to
211-
read these instructions, let alone follow it to any simulacrum.
207+
read these instructions, let alone follow them to any simulacrum.
212208

213209
That said, bugs sometimes get fixed even though these instructions are not followed.
214210

215-
I may take into consideration is the bug reporter's karma.
211+
I may take into consideration the bug reporter's karma.
216212

217-
* Have you demonstrably contributed to open source? I may look at your github profile to see what contributions you have made, how popular those contributions are, or how popular you are.
218-
* How appreciative are you? Have you starred this project that you are seeking help from? Have you starred _any_ github project? And the above two kind of feed into ...
213+
* Have you demonstrably contributed to open source? I may look at your GitHub profile to see what contributions you have made, how popular those contributions are, or how popular you are.
214+
* How appreciative are you? Have you starred this project that you are seeking help from? Have you starred _any_ GitHub project? And the above two kinds of feed into ...
219215
* Attitude. Some people feel that they are doing me and the world a
220-
great favor by just pointing out that there is a problem whose
221-
solution would greatly benefit them. (This might account partially
222-
for the fact that those that have this attitude often don't read or
216+
great favor by just pointing out that there is a problem whose solution would greatly benefit them. (This might account partially
217+
for the fact that those who have this attitude often don't read or
223218
follow instructions such as those given here.)
224219

225220

226221
# Confidentiality of Bug Reports
227222

228223
When you report a bug, you are giving up confidentiality to the source
229-
code and the byte code. However, I would imagine that if you have
230-
narrowed the problem sufficiently, confidentiality of the little that
224+
code and the bytecode. However, I would imagine that if you have
225+
narrowed the problem sufficiently, the confidentiality of the little that
231226
remains would not be an issue.
232227

233-
However feel free to remove any comments, and modify variable names
228+
However, feel free to remove any comments and modify variable names
234229
or constants in the source code.
235230

236-
If there is some legitimate reason to keep confidentiality, you can contact me by email to explain the extenuating circumstances. However I tend to discard without reading anonymous email.
231+
If there is some legitimate reason to keep confidentiality, you can contact me by email to explain the extenuating circumstances. However, I tend to discard without reading anonymous emails.
237232

238233
Private consulting available via https://calendly.com/rb3216 rates: $150 for 30 minutes; $250 for 60 minutes.

0 commit comments

Comments
 (0)