../src/core/or/channeltls.c:1768:7: error: absolute value function 'labs' given an argument of type 'time_t' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value] 1768 | if (labs(now - chan->conn->handshake_state->sent_versions_at) < 180) { | ^~~~
That code has been there for ages, though. Looks like this is a new compiler warning rather than a new bug. It is a c issue, though, anywhere that time_t is bigger than long.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
On examination, this labs() doesn't belong here at all. The code here is testing whether we are getting a NETINFO cell fairly soon after we sent a VERSIONS cell. Using labs() makes it also test whether we are getting a NETINFO cell no earlier than 3 minutes before sending the VERSION cell, which is silly.
I did a quick review here, because the appveyor failures are blocking backport merges.
I think the new code warns on any skew, but the old code only warned on skews over 1 hour. That change is not documented in the changes file, and seems to be a mistake?
Also, because the old code only warned on skews over 1 hour, the changes file has a confusing description of the old behaviour.
See my comments on the PR for details.
Trac: Priority: Medium to Very High Severity: Normal to Critical Status: needs_review to needs_revision
Seems like there is at least one more such issue that is not resolved by the above branches and appveyor still fails:
../src/feature/nodelist/routerlist.c:2923:21: error: absolute value function 'labs' given an argument of type 'time_t' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value] 2923 | time_difference = labs(r2->uptime - (r1->uptime + (r2pub - r1pub))); | ^~~~depbase=`echo src/feature/nodelist/fmt_routerstatus.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\