[tor-bugs] #27139 [Core Tor/Tor]: macOS i386 fails time unit tests

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Sep 14 12:56:03 UTC 2018


#27139: macOS i386 fails time unit tests
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  nickm
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.5.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  regression, macos, i386,             |  Actual Points:
  034-backport, arm32, 32-bit                    |
Parent ID:  #27296                               |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by nickm):

 * status:  accepted => needs_review


Comment:

 Okay, I think I have it.  The problem was in our 32-bit
 `monotime_coarse_diff_msec32_` implementation: it wasn't precise enough,
 and it didn't try hard enough to avoid integer overflows.  One of our unit
 tests was assuming an amount of precision it just couldn't provide.

 Bugfix in branch `bug27139_034`; PR at
 https://github.com/torproject/tor/pull/334 .

 I tested this by editing the compat_time.h header so that the
 `monotime_coarse_diff_msec32()` inline function would always use the
 32-bit implementation.

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


More information about the tor-bugs mailing list