[tor-bugs] #17827 [Tor]: Different return type of backtrace function on FreeBSD

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 15 16:30:01 UTC 2015


#17827: Different return type of backtrace function on FreeBSD
---------------------------------------+-----------------------------------
 Reporter:  cypherpunks                |          Owner:
     Type:  defect                     |         Status:  needs_review
 Priority:  Medium                     |      Milestone:  Tor:
Component:  Tor                        |  0.2.8.x-final
 Severity:  Normal                     |        Version:  Tor:
 Keywords:  027-backport freebsd easy  |  0.2.5.2-alpha
Parent ID:                             |     Resolution:
  Sponsor:                             |  Actual Points:
                                       |         Points:
---------------------------------------+-----------------------------------

Comment (by teor):

 Looks great, let's get this merged!

 Why this patch works:
 * int is smaller than or equal to size_t on all platforms, so when we cast
 int to size_t, clang won't give any warnings.
 * clang doesn't give any warnings when a size_t is passed to the function,
 at least on OS X (x86_64 & i386) and Linux (x86_64) where I tested it.

 Why this patch works on the OSs not mentioned above:
 * OS X also uses int, so the function signatures are the same as Linux.

 Open questions:
 * Do we do backtraces on Windows? (I can't find a Windows-specific
 backtrace function to check the argument types.)

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


More information about the tor-bugs mailing list