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

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Dec 12 00:28:58 UTC 2015


#17827: Different return type of backtrace function on FreeBSD
-----------------------------+-----------------
     Reporter:  cypherpunks  |      Owner:
         Type:  defect       |     Status:  new
     Priority:  Medium       |  Milestone:
    Component:  Tor          |    Version:
     Severity:  Normal       |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |    Sponsor:
-----------------------------+-----------------
 Jenkins is failing compilation on FreeBSD because its backtrace function
 is returning `size_t` instead of `int`. This leads to the compilation
 errors such as
 {{{
 ../tor/src/common/backtrace.c:98:11: error: implicit conversion loses
 integer precision: 'size_t' (aka 'unsigned long') to 'int'
 [-Werror,-Wshorten-64-to-32]
   depth = backtrace(cb_buf, MAX_DEPTH);
         ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../tor/src/common/backtrace.c:130:11: error: implicit conversion loses
 integer precision: 'size_t' (aka 'unsigned long') to 'int'
 [-Werror,-Wshorten-64-to-32]
   depth = backtrace(cb_buf, MAX_DEPTH);
         ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../tor/src/common/backtrace.c:177:17: error: implicit conversion loses
 integer precision: 'size_t' (aka 'unsigned long') to 'int'
 [-Werror,-Wshorten-64-to-32]
     int depth = backtrace(cb_buf, MAX_DEPTH);
         ~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 }}}

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


More information about the tor-bugs mailing list