[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #18902 [Core Tor/Tor]: Avoid variable shadowing in Tor
#18902: Avoid variable shadowing in Tor
---------------------------+------------------------------
Reporter: teor | Owner: cypherpunks
Type: defect | Status: assigned
Priority: Medium | Milestone: Tor: 0.2.???
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: easy refactor | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------+------------------------------
Comment (by teor):
Please be aware that we might take a long time to review, or reject, a
patch that takes a lot of time to manually verify. It's too easy to
introduce bugs this way.
Why not try tools like coccinelle, or a scripting language?
Most compilers will give you line numbers of shadowing and shadowed
variables.
One strategy could be to temporarily change outer and inner names, then
check using a compiler.
There is a risk that inner variables will accidentally be changed to the
outer variable name, but that's the only risk I can see.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18902#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs