[tor-bugs] #18902 [Core Tor/Tor]: Avoid variable shadowing in Tor

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Apr 26 16:04:08 UTC 2016


#18902: Avoid variable shadowing in Tor
------------------------------+---------------------------
     Reporter:  teor          |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.2.???
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  easy refactor
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+---------------------------
 Tor sure does shadow a lot of local and global variables with its block-
 level variable declarations.

 I spot-checked a few of these and they look harmless.

 Still, it would be great if we removed them by renaming the variables in
 the innermost scope. This would avoid confusion, and remove the
 possibility of bugs where the declaration is removed, and the identifier
 references the outer scope.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18902>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list