[tor-bugs] #13036 [Tor]: Uninitialised Variable & NULL Pointer Dereference Warnings in Clang

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 2 11:27:42 UTC 2014


#13036: Uninitialised Variable & NULL Pointer Dereference Warnings in Clang
--------------------+------------------------------------
 Reporter:  teor    |          Owner:
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:
Component:  Tor     |        Version:  Tor: 0.2.5.5-alpha
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+------------------------------------
 clang and clang --analyze produces around 10 uninitialised variable and
 NULL pointer dereference warnings when compiling tor from git source on OS
 X.

 Some of these warnings may be incorrect, but I've checked the context of
 the warnings, and the logic that ensures each variable is valid isn't
 obvious to me (or clang). But I might be missing something.

 The attached patches resolve these warnings by initialising the variables,
 and / or asserting valid values before variables are read.

 These warnings occur in the git source of tor 0.2.6.0?-alpha around 1
 September 2014
 e.g. commit 67c0ad54263be7fb742a8d499f97f5908f9ec970

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


More information about the tor-bugs mailing list