Commit Graph

8003 Commits

Author SHA1 Message Date
David Goulet 5ba521297f Merge branch 'maint-0.3.5' into release-0.3.5 2021-01-21 16:06:54 -05:00
David Goulet 8500700aa4 build: Add "make lsp" command
Generates the compile_commands.json file using the "bear" application so the
ccls server can be more efficient with our code base.

Closes #40227

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-21 16:06:31 -05:00
Nick Mathewson 05ee5b983c Merge branch 'maint-0.3.5' into release-0.3.5 2021-01-19 12:53:52 -05:00
Nick Mathewson faf7b550e7 Merge remote-tracking branch 'tor-gitlab/mr/143' into maint-0.3.5 2021-01-19 12:53:30 -05:00
Nick Mathewson e85f517831 Merge branch 'maint-0.3.5' into release-0.3.5 2021-01-19 12:45:07 -05:00
Nick Mathewson fa8ecf8820 Better fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)
This one should work on GCC _and_ on Clang.  The previous version
made Clang happier by not having unreachable "fallthrough"
statements, but made GCC sad because GCC didn't think that the
unconditional failures were really unconditional, and therefore
_wanted_ a FALLTHROUGH.

This patch adds a FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL macro that
seems to please both GCC and Clang in this case: ordinarily it is a
FALLTHROUGH, but when ALL_BUGS_ARE_FATAL is defined, it's an
abort().

Fixes bug 40241 again.  Bugfix on earlier fix for 40241, which was
merged into maint-0.3.5 and forward, and released in 0.4.5.3-rc.
2021-01-13 09:54:43 -05:00
Nick Mathewson 5aceb7ca19 Merge branch 'maint-0.3.5' into release-0.3.5 2021-01-11 14:37:28 -05:00
Nick Mathewson ccdbbae4ec Fix warnings in current debian-hardened CI.
We're getting "fallback annotation annotation in unreachable code"
warnings when we build with ALL_BUGS_ARE_FATAL. This patch fixes
that.

Fixes bug 40241.  Bugfix on 0.3.5.4-alpha.
2021-01-11 14:25:56 -05:00
Nick Mathewson 6cd23b29d2 Merge branch 'maint-0.3.5' into release-0.3.5 2020-11-16 22:42:22 -05:00
Nick Mathewson fcae26adf7 Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5 2020-11-16 22:42:15 -05:00
Nick Mathewson 412da7c85c Changelog for 0.3.5.12 2020-11-09 17:04:08 -05:00
Nick Mathewson ec9d646923 Merge branch 'maint-0.3.5' into release-0.3.5 2020-11-09 16:13:42 -05:00
Nick Mathewson 52e439c13e Merge remote-tracking branch 'tor-gitlab/mr/189' into maint-0.3.5 2020-11-09 16:13:24 -05:00
Nick Mathewson 31a6a101a0 Handle a change in the implementation of hashlib in Python 3.9
Previously, hashlib.shake_256 was a class (if present); now it can
also be a function.  This change invalidated our old
compatibility/workaround code, and made one of our tests fail.

Fixes bug 40179; bugfix on 0.3.1.6-rc when the workaround code was
added.
2020-11-05 09:34:36 -05:00
Alexander Færøy 55b8eedba8 Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-28 15:17:51 +00:00
Nick Mathewson dd63b97288 Implement proposal 318: Limit protovers to 0..63
In brief: we go through a lot of gymnastics to handle huge protover
numbers, but after years of development we're not even close to 10
for any of our current versions.  We also have a convenient
workaround available in case we ever run out of protocols: if (for
example) we someday need Link=64, we can just add Link2=0 or
something.

This patch is a minimal patch to change tor's behavior; it doesn't
take advantage of the new restrictions.

Implements #40133 and proposal 318.
2020-10-14 11:28:37 -04:00
Nick Mathewson 58b23b33e4 Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 09:29:17 -04:00
Nick Mathewson 741edf1b45 Merge remote-tracking branch 'tor-github/pr/1827/head' into maint-0.3.5 2020-10-07 09:29:07 -04:00
Nick Mathewson c80052f603 Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:38:30 -04:00
David Goulet b404f085ad hs-v2: Add deprecation warning for service
If at least one service is configured as a version 2, a log warning is emitted
once and only once.

Closes #40003

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-07 08:38:23 -04:00
Nick Mathewson c18d0b378c Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:29:31 -04:00
Nick Mathewson 5f5587ee50 Merge remote-tracking branch 'tor-gitlab/mr/77' into maint-0.3.5 2020-10-07 08:29:23 -04:00
Nick Mathewson 0343ec056e Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:26:04 -04:00
Nick Mathewson ad7ffa5240 Merge remote-tracking branch 'tor-gitlab/mr/79' into maint-0.3.5 2020-10-07 08:25:55 -04:00
Nick Mathewson 3fe253e6e1 Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:16:19 -04:00
Nick Mathewson 98e14720b5 Merge remote-tracking branch 'tor-github/pr/1661/head' into maint-0.3.5 2020-10-07 08:14:46 -04:00
Nick Mathewson c3845263fe Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:10:08 -04:00
Nick Mathewson 968b6c30c1 Merge remote-tracking branch 'tor-gitlab/mr/43' into maint-0.3.5 2020-10-07 08:09:59 -04:00
Nick Mathewson 3144e2ce2d Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:08:01 -04:00
Nick Mathewson e0e0ef713e Merge remote-tracking branch 'tor-gitlab/mr/137' into maint-0.3.5 2020-10-07 08:07:53 -04:00
Nick Mathewson 2c5a2c6997 Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:05:40 -04:00
Nick Mathewson 84a5bd48e2 Merge remote-tracking branch 'tor-gitlab/mr/103' into maint-0.3.5 2020-10-07 08:05:31 -04:00
Nick Mathewson 412b665d5f Merge branch 'maint-0.3.5' into release-0.3.5 2020-10-07 08:03:52 -04:00
Nick Mathewson ed6a328297 Merge branch 'mr_124_squashed' into maint-0.3.5 2020-10-07 08:00:59 -04:00
Nick Mathewson c5ba8b6221 Parallelize src/test/test into chunks.
First, we introduce a flag to teach src/test/test to split its work
into chunks.  Then we replace our invocation of src/test/test in our
"make check" target with a set of 8 scripts that invoke the first
8th of the tests, the second 8th, and so on.

This change makes our "make -kj4 check" target in our hardened
gitlab build more than twice as fast, since src/test/test was taking
the longest to finish.

Closes 40098.
2020-10-07 08:00:49 -04:00
David Goulet 995a3d5e17 Merge branch 'maint-0.3.5' into release-0.3.5 2020-09-22 13:47:08 -04:00
David Goulet faf89ec6c2 srv: Remove spammy debug log
Fixes #40135

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-09-22 11:06:34 -04:00
David Goulet 814fa6d636 Merge branch 'maint-0.3.5' into release-0.3.5 2020-09-18 09:45:25 -04:00
Nick Mathewson 7945e075a4 Fix underflow in rend_cache/free_all test.
We already fixed these in #40099 and #40125.

This patch fixes #40126.  Bugfix on 0.2.8.1-alpha.
2020-09-17 14:04:54 -04:00
Nick Mathewson 3ee664bb33 Merge branch 'maint-0.3.5' into release-0.3.5 2020-09-17 13:56:40 -04:00
David Goulet 47f1d19f8e test: Increment rend cache allocation before freeing
The rend_cache/entry_free was missing the rend cache allocation increment
before freeing the object.

Without it, it had an underflow bug:

  Sep 17 08:40:13.845 [warn] rend_cache_decrement_allocation(): Bug: Underflow
  in rend_cache_decrement_allocation (on Tor 0.4.5.0-alpha-dev
  7eef9ced61)

Fixes #40125

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-09-17 13:00:23 -04:00
Nick Mathewson 020e8e41c6 Resolve a compilation warning in test_connection.c
Instead of casting an enum to a void and back, use a string --
that's better C anyway.

Fixes bug 40113; bugfix on 0.2.9.3-alpha.
2020-09-14 11:50:38 -04:00
David Goulet ea339227c2 conn: Remove assert on new listener connection when retrying
Opening a new listener connection can fail in many ways like a bind()
permission denied on a low port for instance.

And thus, we should expect to handle an error when creating a new one instead
of assert() on it.

To hit the removed assert:

  ORPort 80
  KeepBindCapabilities 0

Start tor. Then edit torrc:

  ORPort <some-IP>:80

HUP tor and the assert is hit.

Fixes #40073

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-09-01 10:01:21 -04:00
Nick Mathewson ee72c517b2 Merge branch 'maint-0.3.5' into release-0.3.5 2020-08-13 14:20:39 -04:00
Nick Mathewson f9bb49d870 Fix allocation counting in clean_v2_descs_as_dir test.
Without this fix, running this test on its own would fail.

Fixes bug 40099. Bugfix on ade5005853 in 0.2.8.1-alpha.
2020-08-12 14:25:46 -04:00
Nick Mathewson afb6ff1739 Validate ed25519 keys and canonicity from circuit_n_conn_done()
Fixes bug 40080. Bugfix on 0.2.7.2-alpha.
2020-08-06 15:59:28 -04:00
Nick Mathewson 435f31aed3 Remove channel_is_canonical_is_reliable()
This function once served to let circuits continue to be built over
version-1 link connections.  But such connections are long-obsolete,
and it's time to remove this check.

Closes #40081.
2020-08-03 11:25:37 -04:00
Alexander Færøy 25811d4e72 Merge branch 'maint-0.3.5' into release-0.3.5 2020-07-31 02:03:34 +00:00
Nick Mathewson c4742b89b2 Fix a bug in buf_move_all() when the input buffer is empty.
We found this in #40076, after we started using buf_move_all() in
more places.  Fixes bug #40076; bugfix on 0.3.3.1-alpha.  As far as
I know, the crash only affects master, but I think this warrants a
backport, "just in case".
2020-07-30 14:24:25 -04:00
Nick Mathewson 50f5f0001c Merge branch 'maint-0.3.5' into release-0.3.5 2020-07-29 12:37:07 -04:00