Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
29299860
Commit
29299860
authored
9 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Actually add HowToReview.txt
parent
609c1e88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/HACKING/HowToReview.txt
+85
-0
85 additions, 0 deletions
doc/HACKING/HowToReview.txt
with
85 additions
and
0 deletions
doc/HACKING/HowToReview.txt
0 → 100644
+
85
−
0
View file @
29299860
How to review a patch
=====================
Some folks have said that they'd like to review patches more often, but they
don't know how.
So, here are a bunch of things to check for when reviewing a patch!
Note that if you can't do every one of these, that doesn't mean you can't do
a good review! Just make it clear what you checked for and what you didn't.
Top-level smell-checks
----------------------
(Difficulty: easy)
Does it compile with --enable-gcc-warnings?
Does 'make check-spaces' pass?
Does it have a reasonable amount of tests? Do they pass? Do they leak
memory?
Do all the new functions, global variables, types, and structure members have
documentation?
Do all the the functions, global variables, types, and structure members with
modified behavior have modified documentation?
Do all the new torrc options have documentation?
If this changes Tor's behavior on the wire, is there a design proposal?
Let's look at the code!
-----------------------
Does the code conform to CodingStandards.txt?
Does the code leak memory?
If two or more pointers ever point to the same object, is it clear which
pointer "owns" the object?
Are all allocated resources freed?
Are all pointers that should be const, const?
Are #defines used for 'magic' numbers?
Can you understand what the code is trying to do?
Can you convince yourself that the code really does that?
Is there duplicated code that could be turned into a function?
Let's look at the documentation!
--------------------------------
Does the documentation confirm to CodingStandards.txt?
Does it make sense?
Can you predict what the function will do from its documentation?
Let's think about security!
---------------------------
If there are any arrays, buffers, are you 100% sure that they cannot
overflow?
If there is any integer math, can it overflow or underflow?
If there are any allocations, are you sure there are corresponding
deallocations?
Is there a safer pattern that could be used in any case?
Have they used one of the Forbidden Functions?
(Also see your favorite secure C programming guides.)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment