Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:29:21Zhttps://gitlab.torproject.org/legacy/trac/-/issues/27139macOS i386 fails time unit tests2020-06-13T15:29:21ZteormacOS i386 fails time unit tests```
circuitmux/compute_ticks: [forking]
FAIL src/test/test_circuitmux.c:109: assert(rem OP_LT .150000001): 0.1505 vs 0.15
[compute_ticks FAILED]
```
```
mainloop/update_time_jumps: [forking]
FAIL src/test/test_mainloop.c:115: ex...```
circuitmux/compute_ticks: [forking]
FAIL src/test/test_circuitmux.c:109: assert(rem OP_LT .150000001): 0.1505 vs 0.15
[compute_ticks FAILED]
```
```
mainloop/update_time_jumps: [forking]
FAIL src/test/test_mainloop.c:115: expected log to not contain entries Captured logs:
1. notice: "Your system clock just jumped 1800 seconds forward; assuming established circuits no longer work.\n"
[update_time_jumps FAILED]
```
Should we set up macOS i386 CI to detect issues like this?
Or should we remove macOS i386 from our supported platforms?
(Apple won't support i386 in the next macOS, so in ~3 years time, we won't need to support it.)Tor: 0.3.5.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/24688timing wheels should use 32-bit math on 32-bit platforms2020-06-13T15:19:17ZNick Mathewsontiming wheels should use 32-bit math on 32-bit platformsI think this might help our 32-bit performance a bit.
Not putting this in needs_review yet, since it needs more analysis.
```
diff --git a/src/common/timers.c b/src/common/timers.c
index 93cde7de5fbd4b..3c806b7f4b422a 100644
--- a/src/...I think this might help our 32-bit performance a bit.
Not putting this in needs_review yet, since it needs more analysis.
```
diff --git a/src/common/timers.c b/src/common/timers.c
index 93cde7de5fbd4b..3c806b7f4b422a 100644
--- a/src/common/timers.c
+++ b/src/common/timers.c
@@ -66,6 +66,11 @@ struct timeout_cb {
* above TIMEOUT_MAX can also be super-inefficent. Choosing 5 here sets
* timeout_max to 2^30 ticks, or 29 hours with our value for USEC_PER_TICK */
#define WHEEL_NUM 5
+#if SIZEOF_VOID_P == 4
+/* On 32-bit platforms, we want to override wheel_bit, so that timeout.c will
+ * use 32-bit math. */
+#define WHEEL_BIT 5
+#endif
#include "src/ext/timeouts/timeout.c"
static struct timeouts *global_timeouts = NULL;
```Tor: 0.3.4.x-finalNick MathewsonNick Mathewson