[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #13192 [Tor]: Collect aggregate stats of total hidden service usage vs total exit usage in Tor network



#13192: Collect aggregate stats of total hidden service usage vs total exit usage
in Tor network
-----------------------------+---------------------------------------
     Reporter:  arma         |      Owner:
         Type:  enhancement  |     Status:  needs_review
     Priority:  normal       |  Milestone:  Tor: 0.2.???
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  SponsorR tor-relay tor-hs
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+---------------------------------------

Comment (by dgoulet):

 Replying to [comment:51 karsten]:
 > I changed the `p == 0.0` part to `p <= 0.0` because GCC thinks we
 shouldn't compare floats with `==`.  Not sure if we should instead do
 something like `< 0.0000000000000002` (smallest possible positive double
 value).

 Ah right! Forgot about that! Fun with float!... :)

 >
 > I don't know what to do about `trunc` vs. `tor_trunc`.  I figured it's
 probably harmless.  Want to investigate?  And want to add a comment?  I
 think teor's idea there was to silence clang warnings which we'd get when
 converting using an explicit cast and which we don't get when doing the
 conversion even more explicitly.

 I don't think `trunc` is any useful and I can't get any clang warnings if
 it's a direct cast so maybe teor can enlight us on that.

 However there is an other problem. Consider this example,
 https://people.torproject.org/~dgoulet/volatile/float.c, please run it and
 you'll see that even with a double well in between `[INT64_MIN,
 INT64_MAX]` when cast to int64_t weird things happen. In this case here,
 we always underflow even though the value is supposed to be valid which
 will make `sample_laplace_distribution` return wrong values because of the
 cast. (llround or/and trunc don't matter here, see example).

 Yawning is playing with this as we speak to understand it...

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13192#comment:52>
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