George Kadianakis
a71999462b
Fix test prob distr parameters that caused warnings.
...
They were causing the following warnings in circuitpadding/circuitpadding_sample_distribution:
src/lib/math/prob_distr.c:1311:17: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/lib/math/prob_distr.c:1311:17 in
src/lib/math/prob_distr.c:1219:49: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/lib/math/prob_distr.c:1219:49 in
because the distributions were called with erroneous parameters (e.g. geometric
distribution with p=0).
We now defined these test probability distributions with more realistic
parameters.
As far as the circuitpadding_sample_distribution() test is concerned, it
doesn't matter if the distributions return values outside of [0,10] since we
already restrict the values into that interval using min=0 and max=10 (and RTT
estimate is disabled).
2019-03-13 10:36:26 -04:00
George Kadianakis
18de065cbb
Switch an int32_t bin to a circpad_hist_index_t.
2019-02-25 14:01:55 +02:00
George Kadianakis
71c11d7306
document picking infinity bin
2019-02-25 13:59:18 +02:00
George Kadianakis
331a067ae3
Fix dist_min_usec documentation and naming.
2019-02-25 13:46:58 +02:00
George Kadianakis
341cd6ea66
histogram_edges is histogram_len long
2019-02-25 13:28:35 +02:00
George Kadianakis
3093d8afbe
Fix tests to use the new design.
...
- All histogram tests were using start_usec/range_usec. We now manually specify
the edges.
- Also add a test for histogram_get_bin_upper_bound().
2019-02-15 17:43:41 +02:00
George Kadianakis
80abe4170d
Update all the histogram functions to use the new design.
2019-02-15 17:43:23 +02:00
George Kadianakis
98af25e013
Remove start_usec/range_usec and make equivalent fields for distributions.
2019-02-15 17:43:01 +02:00
George Kadianakis
f07c6ae57c
Add histogram fields in header file that allow specifying edges.
2019-02-15 17:42:17 +02:00
David Goulet
c320c52e89
Merge branch 'tor-github/pr/690'
2019-02-12 13:04:25 -05:00
David Goulet
95e5f8fe03
Merge branch 'tor-github/pr/671'
2019-02-12 13:02:30 -05:00
Nick Mathewson
72b978c3a5
On windows, if we fail to load a consensus and it has a CRLF, retry.
...
Fixes bug 28614; bugfix on 0.4.0.1-alpha when we started mmapping
the consensus.
2019-02-12 12:57:33 -05:00
Nick Mathewson
a797a69679
Merge branch 'maint-0.3.5'
2019-02-12 09:56:50 -05:00
Nick Mathewson
2e770216c4
Merge branch 'maint-0.3.4' into maint-0.3.5
2019-02-12 09:56:49 -05:00
Nick Mathewson
db209d4dba
Merge branch 'maint-0.3.3' into maint-0.3.4
2019-02-12 09:56:49 -05:00
Nick Mathewson
7ead2af622
Merge branch 'maint-0.2.9' into maint-0.3.3
2019-02-12 09:56:49 -05:00
Nick Mathewson
ed05b7dddc
Merge branch 'maint-0.3.5'
2019-02-12 09:55:09 -05:00
David Goulet
46b6df7122
test: Fix a warning underflow in rend_cache/clean
...
Because the test is adding entries to the "rend_cache" directly, the
rend_cache_increment_allocation() was never called which made the
rend_cache_clean() call trigger that underflow warning:
rend_cache/clean: [forking] Nov 29 09:55:04.024 [warn] rend_cache_decrement_allocation(): Bug: Underflow in rend_cache_decrement_allocation (on Tor 0.4.0.0-alpha-dev 2240fe63feb9a8cf)
The test is still good and valid.
Fixes #28660
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-02-12 09:15:41 -05:00
Karsten Loesing
a3f9ddcf03
Update geoip and geoip6 to the February 5 2019 database.
2019-02-12 14:40:42 +01:00
Nick Mathewson
7f59b9fb1f
Merge branch 'maint-0.3.5'
2019-02-08 08:37:46 -05:00
Nick Mathewson
ab65347819
Merge branch 'ticket29040_1_changes' into maint-0.3.5
2019-02-08 08:37:43 -05:00
Nick Mathewson
eca0f87801
Add changes file for bug 29040.
2019-02-08 08:37:23 -05:00
Nick Mathewson
b1ae2fd65b
Merge branch 'maint-0.3.5'
2019-02-08 08:19:34 -05:00
Nick Mathewson
4b36f9676d
Merge remote-tracking branch 'tor-github/pr/670' into maint-0.3.5
2019-02-08 08:19:31 -05:00
Roger Dingledine
bfd1d70243
Merge branch 'maint-0.3.5'
2019-02-05 08:10:43 -05:00
Roger Dingledine
bca25eebfb
Merge branch 'maint-0.3.4' into maint-0.3.5
2019-02-05 08:10:14 -05:00
Roger Dingledine
8ea98c0f4c
Merge branch 'maint-0.3.3' into maint-0.3.4
2019-02-05 08:09:47 -05:00
Peter Gerber
83b1ca9b07
Add release note for bug 29150
2019-02-02 23:10:16 +00:00
Nick Mathewson
4d7a0a1310
Update Cargo.lock with new comment; suppress 29244.
2019-02-01 16:38:23 +01:00
Nick Mathewson
bbd893d6bd
Write consensus files in binary mode
...
This will help us out on windows now that we mmap files. Fixes part
of ticket 28614.
2019-01-29 16:18:41 +01:00
rl1987
790150e57a
Allow empty username/password in SOCKS5 username/password auth message
2019-01-26 11:06:33 +02:00
Nick Mathewson
d9010c5b67
One more 32-bit clang warning
2019-01-24 15:23:06 -05:00
Nick Mathewson
e19222a0da
Use tt_u64_op() in test_circuitpadding.c to fix compilation warnings
...
Fixes bug 29169.
2019-01-24 13:20:21 -05:00
Nick Mathewson
8b254c1c70
Merge branch 'precommit_squashed'
2019-01-24 11:08:10 -05:00
Nick Mathewson
dd22c84ccf
Only run the checkIncludes.py script if it exists
...
(It was added in 0.3.5)
2019-01-24 08:06:09 -05:00
Nick Mathewson
107e50a90f
lintChanges.py didn't take a directory argument in 0.2.9
2019-01-24 08:05:42 -05:00
rl1987
611e8dcda7
Also run checkInclude.py before every commit
2019-01-24 08:03:17 -05:00
rl1987
99fffc6c2f
Add a pre-commit hook that runs code and changelog entry formatting checks
2019-01-24 08:03:17 -05:00
Suphanat Chunhapanya
238a9080c6
hs-v3: add an option param to safe log functions
...
We add an option param to safe_str and safe_str_client because in
some case we need to use those functions before global_options is set.
2019-01-24 04:31:18 +07:00
Suphanat Chunhapanya
8de735f068
hs-v3: fix use after free in client auth config
...
We accidentally use `auth` after freeing it in
client_service_authorization_free. The way to solve it is to
free after using it.
2019-01-24 04:31:07 +07:00
Nick Mathewson
adeeb8841e
Merge branch 'maint-0.3.5'
2019-01-23 11:18:14 -05:00
rl1987
712a622fce
Log an HSDesc we failed to parse at Debug loglevel
2019-01-23 10:37:10 -05:00
Nick Mathewson
5ec566edda
Merge branch 'maint-0.3.5'
2019-01-23 09:51:32 -05:00
Nick Mathewson
1c5f03fba7
Merge branch 'maint-0.3.3' into maint-0.3.4
2019-01-23 09:51:02 -05:00
Nick Mathewson
f9050681c0
Merge branch 'maint-0.3.4' into maint-0.3.5
2019-01-23 09:51:02 -05:00
Nick Mathewson
d1c0dbabfa
Merge branch 'maint-0.2.9' into maint-0.3.3
...
"ours" merge to avoid dropping non-broken changes files after
removal of merged 0.2.9 changes files.
2019-01-23 09:50:38 -05:00
Nick Mathewson
dd6c2b0ad7
maint-0.2.9: remove changes files that are merged in 0.2.9 releases
...
Many of these files cause check-changes to fail, which will be a
long-term problem as we continue to support 0.2.9.
2019-01-23 09:48:28 -05:00
Peter Gerber
db3ee1d862
Allow getsockopt(…, SOL_SOCKET, SO_ACCEPTCONN, …) in sandbox
...
SO_ACCEPTCONN checks whether socket listening is enabled and is
used ever since 9369152aae
has been merged.
Closes ticket #29150
2019-01-22 21:51:25 +00:00
Nick Mathewson
8e1e71cc0d
Merge branch 'bug29122'
2019-01-22 14:31:01 -05:00
George Kadianakis
6243133a71
Fix intermittent failures of test_circuitpadding_wronghop().
...
We fix it by disabling the scheduling of actual padding.
Fixes #29122 .
2019-01-22 14:30:43 -05:00