Commit Graph

33796 Commits

Author SHA1 Message Date
David Goulet
ca1f18c159 Merge branch 'tor-github/pr/1385' 2019-10-02 14:15:31 -04:00
David Goulet
014abf86e5 Merge branch 'tor-github/pr/1344' 2019-10-02 10:37:49 -04:00
David Goulet
40be20d542 Merge branch 'tor-github/pr/1363' 2019-10-02 10:34:46 -04:00
Nick Mathewson
a74c180691 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-10-02 08:01:34 -04:00
Nick Mathewson
4dcbbe4166 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-10-02 08:01:34 -04:00
Nick Mathewson
c81e1e4542 Merge branch 'maint-0.4.1' 2019-10-02 08:01:34 -04:00
Nick Mathewson
7b9cb4c47b Merge branch 'maint-0.2.9' into maint-0.3.5 2019-10-02 08:01:33 -04:00
Karsten Loesing
90de776ea9 Update geoip and geoip6 to the October 1 2019 database. 2019-10-02 11:11:27 +02:00
teor
3f94441bfe
log: fix a typo in the function comment for log_fn_()
Closes 31923.
2019-10-02 12:12:26 +10:00
teor
b0bf7e7b60
Travis: Allow the build to finish before the macOS Rust job
When we merged TOR_RUST_VERSION from master, the allow_failures rule
did not match any more. Update it to make it match.

Closes 31859 for master.
2019-10-02 10:09:02 +10:00
Nick Mathewson
2b825a1a2e Fix a crash bug in max_u16_in_sl()
The documentation for this function says that the smartlist can
contain NULLs, but the code only handled NULLs if they were at the
start of the list.

We didn't notice this for a long time, because when Tor is run
normally, the sequence of msg_id_t is densely packed, and so this
list (mapping msg_id_t to channel_id_t) contains no NULL elements.
We could only run into this bug:
  * when Tor was running in embedded mode, and starting more than once.
  * when Tor ran first with more pubsub messages enabled, and then
    later with fewer.
  * When the second run (the one with fewer enabled pubsub messages)
    had at least some messages enabled, and those messages were not
    the ones with numerically highest msg_id_t values.

Fixes bug 31898; bugfix on 47de9c7b0a
in 0.4.1.1-alpha.
2019-10-01 13:01:20 -04:00
Nick Mathewson
34bbdaf5d4 Add a test for max_u16_in_sl().
This test does not currently pass, because of bug 31898.
2019-10-01 13:01:20 -04:00
Nick Mathewson
f17591b8e5 Rename max_in_sl to max_in_u16_sl, and expose it as STATIC.
Since we want to make this function slightly more visible for testing
purposes, it needs a better name.
2019-10-01 13:01:20 -04:00
teor
58746ad9ca
Merge branch 'bug31859_041' into bug31859_master
Merge master's RUST_VERSION="nightly" into the macOS Rust job
from bug31859_041.

Drop master's RUST_VERSION="beta", because we only have two
Rust jobs now.
2019-10-02 00:20:38 +10:00
teor
e5dda7f664
Merge branch 'bug31859_040' into bug31859_041
Merge TOR_TEST_RNG_SEED in maint-0.4.1 into the coverage line
from bug31859_040.
2019-10-01 23:50:24 +10:00
teor
07db4141ab
Merge branch 'bug31859_035' into bug31859_040 2019-10-01 23:46:28 +10:00
Nick Mathewson
39640728c3 Add comments to try to prevent recurrence of #31495.
There is a bad design choice in two of our configuration types,
where the empty string encodes a value that is not the same as the
default value.  This design choice, plus an implementation mistake,
meant that config_dup() did not preserve the value of routerset_t,
and thereby caused bug #31495.

This comment-only patch documents the two types with the problem,
and suggests that implementors try to avoid it in the future.

Closes ticket 31907.
2019-10-01 09:45:12 -04:00
teor
632e707397
Travis: Keep the macOS Rust job, but don't wait for it to finish
Since Rust on macOS is slow, don't wait for the macOS Rust job to finish.
Instead, split rust into slow rust (macOS) and fast rust (Linux). And
allow the build to finish before slow rust finishes.

Also make sure that we have:
* a Rust build on each platform,
* a Rust build with each compiler, and
* a check on all our Rust builds.

Finally, sort builds: allow fail last, macOS first, slowest first.

Closes 31859 for 0.3.5.
2019-10-01 23:42:51 +10:00
George Kadianakis
e8e42f4af9 Help users who try to use v2 client auth in v3 onions. 2019-10-01 13:41:21 +03:00
George Kadianakis
723288a32f Improve v3 client auth documentation in the man page. 2019-10-01 13:39:34 +03:00
teor
4482d6fde5
Travis: Split jobs, add essential jobs, remove redundant jobs
Part of 31859 for 0.3.5.
2019-10-01 17:32:09 +10:00
teor
f368f5bc37
Merge branch 'bug31859_029' into bug31859_035
While merging:
* leave out some redundant jobs and build matrix entries
2019-10-01 17:31:55 +10:00
Nick Mathewson
6581f3e2fa Fix the documentation for GuardLifetime. 2019-09-30 14:54:52 -04:00
teor
1e0e23c1e4
Travis: Add a macOS chutney job, but don't wait for it to finish
Since Travis macOS has IPv6 support (and Travis Linux does not), chutney
will now run its IPv6 networks as part of Travis CI.

But since chutney is slow, don't wait for the macOS chutney to finish.
(Travis have fixed the duplicate notification bug in fast_finish. So we
can use fast_finish and allow_failure to finish early. Unfortunately,
allow_failure also means we ignore failures in macOS chutney.)

Also make sure that we have:
* a compile on each platform, with each compiler,
* a check on each platform, and
* a check on each compiler.

Finally, sort builds: allow fail last, macOS first, slowest first.

Closes ticket 30860.
Closes ticket 31859 for 0.2.9.
2019-09-30 23:58:38 +10:00
teor
4e4297830e
Travis: Remove a redundant clang Linux job
Part of 31859.
2019-09-30 23:58:24 +10:00
teor
56d0655ed8 err: Remove a duplicate header in backtrace.c 2019-09-30 23:17:04 +10:00
teor
c23986246b err: Always lock the backtrace buffer before it is used
Fixes bug 31734; bugfix on 0.2.5.3-alpha.
2019-09-30 23:17:04 +10:00
Nick Mathewson
53116ca0b7 Re-run "make autostyle" with improved annotate_ifdef_directives 2019-09-30 08:57:37 -04:00
teor
db329522ef
log: When initialising log domain masks, only set known log domains
And add a runtime test that checks for unknown domains and flags.

Fixes bug 31854; bugfix on 0.2.1.1-alpha.
2019-09-30 22:05:00 +10:00
teor
25c5322dfe
log: Define count, boundary, and all macros for domains and flags
And do static checks on those macro definitions.

Part of 31854.
2019-09-30 22:04:03 +10:00
teor
4c88ebcf47
log: Remove duplicate code and an outdated comment
Preparation for 31854.
2019-09-30 22:03:59 +10:00
George Kadianakis
de66bed604 Merge branch 'tor-github/pr/1366' 2019-09-30 14:01:01 +03:00
George Kadianakis
9318682109 Merge branch 'tor-github/pr/1346' 2019-09-30 13:56:51 +03:00
George Kadianakis
ae8d36db31 Merge branch 'tor-github/pr/1302' 2019-09-30 13:47:53 +03:00
George Kadianakis
fc760c5088 Merge branch 'tor-github/pr/1356' 2019-09-30 13:47:06 +03:00
George Kadianakis
4673cb8168 Merge branch 'tor-github/pr/1339' 2019-09-30 13:44:59 +03:00
teor
b186418792
Appveyor: Avoid spurious errors in Appveyor CI builds
When Appveyor fails before the install step, some of the finish step's
functions were not defined.

Fixes bug 31884; bugfix on 0.3.4.2-alpha.
2019-09-30 15:14:21 +10:00
teor
2420c8c936 test: Avoid a map_anon_nofork test failure on SunOS
This test failure happened due to a signed/unsigned integer
comparison.

This bug occurred on SunOS, it may also occur on other systems that
use signed char as the default. (And cast 1-byte integer constants
to an unsigned integer.)

Fixes bug 31897; bugfix on 0.4.1.1-alpha.
2019-09-30 14:54:56 +10:00
Nick Mathewson
fc1134e3e5 annotate_ifdef_directives: test edge-case of 80-char line
An 80-character line (79 characters if you don't count the newline)
should not be truncated, and should not have a "..." insterted.
2019-09-27 21:04:22 -04:00
Nick Mathewson
21c9f7c85e Annotate_ifdef_directives: doctest for 80-column lines. 2019-09-27 21:04:22 -04:00
Nick Mathewson
f1e0665c93 Rename annotate_ifdef_directives to end with .py.
This allows the python doctest module to process it correctly
when invoked as:
   python -m doctest -v annotate_ifdef_directives.py
2019-09-27 21:04:22 -04:00
Nick Mathewson
d229399e77 annotate_ifdef_directives: Allow it to be imported as a module. 2019-09-27 21:04:22 -04:00
Nick Mathewson
6f0e697e41 Use Doctests to test the behavior of annotate_ifdef_directives. 2019-09-27 21:04:22 -04:00
Nick Mathewson
195aa2f5f7 annotate_ifdef_directives: generate paren-balanced expressions
This algorithm is not fully general, but it strikes a balance
between efficiency, simplicity, and correctness.
2019-09-27 21:04:22 -04:00
Nick Mathewson
21cc9d13f3 annotate_ifdef_directives: clarify situation with newlines
Our line limit is 80 characters, assuming that there is a single
terminating newline character that counts towards the limit.  On
Windows, this might go as high as 81 characters, if we count CRLF as
two characters.
2019-09-26 15:52:45 -04:00
Nick Mathewson
194dbea24d Run "make autostyle" with new "annotate_ifdef_directives" 2019-09-26 15:52:45 -04:00
Nick Mathewson
3283fd7e79 Changes file for 31759 and 31779 2019-09-26 15:52:45 -04:00
Nick Mathewson
65e63e7461 annotate_ifdef_directives: remove some cases of double negation
This change should reduce the number of cases where we say
"/* !(!defined(foo)) */" .

This only does cases where we can use a regex to make sure that the
simplification is guaranteed to be correct.  Full boolean
simplification would require this script to parse C, and nobody
wants that.
2019-09-26 15:52:45 -04:00
Nick Mathewson
ffd857bbe1 Merge remote-tracking branch 'tor-github/pr/1308' 2019-09-26 14:36:37 -04:00
teor
8520071f23
Travis: Unroll the build matrix into matrix: include:
The jobs should be the same, but Travis may display them differently.

Part of 31859.
2019-09-26 18:06:09 +10:00