[tor-commits] [tor/master] Two more small changes for CI.

2018-06-26 Thread nickm
commit cf66544941364ae2c0ed45486ac7b16e61422061
Author: Nick Mathewson 
Date:   Fri Jun 22 13:10:52 2018 -0400

Two more small changes for CI.
---
 src/lib/log/util_bug.c| 2 ++
 src/lib/string/compat_ctype.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c
index cdd862429..161b65e0b 100644
--- a/src/lib/log/util_bug.c
+++ b/src/lib/log/util_bug.c
@@ -17,6 +17,8 @@
 #include "lib/malloc/util_malloc.h"
 #include "lib/string/printf.h"
 
+#include 
+
 #ifdef __COVERITY__
 int bug_macro_deadcode_dummy__ = 0;
 #endif
diff --git a/src/lib/string/compat_ctype.h b/src/lib/string/compat_ctype.h
index 32f314f33..3fde6eaf8 100644
--- a/src/lib/string/compat_ctype.h
+++ b/src/lib/string/compat_ctype.h
@@ -31,6 +31,8 @@ extern const uint8_t TOR_TOLOWER_TABLE[];
 #define TOR_TOLOWER(c) (TOR_TOLOWER_TABLE[(uint8_t)c])
 #define TOR_TOUPPER(c) (TOR_TOUPPER_TABLE[(uint8_t)c])
 
+inline int hex_decode_digit(char c);
+
 /** Helper: given a hex digit, return its value, or -1 if it isn't hex. */
 inline int
 hex_decode_digit(char c)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Remove util_bug dependency on compat.h

2018-06-26 Thread nickm
commit 6fc2d532274ead9c903c6d94b1a513b8d9b6f677
Author: Nick Mathewson 
Date:   Fri Jun 22 11:51:58 2018 -0400

Remove util_bug dependency on compat.h
---
 src/common/compat.c   | 26 --
 src/common/compat.h   |  8 
 src/common/token_bucket.c |  2 +-
 src/common/util_bug.c | 29 -
 src/common/util_bug.h | 12 ++--
 5 files changed, 39 insertions(+), 38 deletions(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 467c51d6e..8e418f4c1 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -493,32 +493,6 @@ tor_strtok_r_impl(char *str, const char *sep, char **lasts)
   return start;
 }
 
-#ifdef _WIN32
-/** Take a filename and return a pointer to its final element.  This
- * function is called on __FILE__ to fix a MSVC nit where __FILE__
- * contains the full path to the file.  This is bad, because it
- * confuses users to find the home directory of the person who
- * compiled the binary in their warning messages.
- */
-const char *
-tor_fix_source_file(const char *fname)
-{
-  const char *cp1, *cp2, *r;
-  cp1 = strrchr(fname, '/');
-  cp2 = strrchr(fname, '\\');
-  if (cp1 && cp2) {
-r = (cp1cp.  Equivalent to
  * *(uint16_t*)(cp), but will not cause segfaults on platforms that forbid
diff --git a/src/common/compat.h b/src/common/compat.h
index f91c22425..691824a2e 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -92,14 +92,6 @@ char *tor_strtok_r_impl(char *str, const char *sep, char 
**lasts);
 #define tor_strtok_r(str, sep, lasts) tor_strtok_r_impl(str, sep, lasts)
 #endif
 
-#ifdef _WIN32
-#define SHORT_FILE__ (tor_fix_source_file(__FILE__))
-const char *tor_fix_source_file(const char *fname);
-#else
-#define SHORT_FILE__ (__FILE__)
-#define tor_fix_source_file(s) (s)
-#endif /* defined(_WIN32) */
-
 /* = Time compatibility */
 
 struct tm *tor_localtime_r(const time_t *timep, struct tm *result);
diff --git a/src/common/token_bucket.c b/src/common/token_bucket.c
index a028b08a0..502e8eac5 100644
--- a/src/common/token_bucket.c
+++ b/src/common/token_bucket.c
@@ -19,6 +19,7 @@
 #define TOKEN_BUCKET_PRIVATE
 
 #include "common/token_bucket.h"
+#include "common/compat.h"
 #include "common/util_bug.h"
 
 /**
@@ -252,4 +253,3 @@ token_bucket_rw_dec(token_bucket_rw_t *bucket,
 flags |= TB_WRITE;
   return flags;
 }
-
diff --git a/src/common/util_bug.c b/src/common/util_bug.c
index 0e6190caf..c68519b74 100644
--- a/src/common/util_bug.c
+++ b/src/common/util_bug.c
@@ -15,6 +15,7 @@
 #include "lib/container/smartlist.h"
 #endif
 #include "lib/malloc/util_malloc.h"
+#include "lib/string/printf.h"
 
 #ifdef __COVERITY__
 int bug_macro_deadcode_dummy__ = 0;
@@ -40,7 +41,7 @@ tor_end_capture_bugs_(void)
 return;
   SMARTLIST_FOREACH(bug_messages, char *, cp, tor_free(cp));
   smartlist_free(bug_messages);
-  bug_messages = NULL;
+nn  bug_messages = NULL;
 }
 const smartlist_t *
 tor_get_captured_bug_log_(void)
@@ -119,3 +120,29 @@ tor_bug_occurred_(const char *fname, unsigned int line,
   }
 #endif
 }
+
+#ifdef _WIN32
+/** Take a filename and return a pointer to its final element.  This
+ * function is called on __FILE__ to fix a MSVC nit where __FILE__
+ * contains the full path to the file.  This is bad, because it
+ * confuses users to find the home directory of the person who
+ * compiled the binary in their warning messages.
+ */
+const char *
+tor_fix_source_file(const char *fname)
+{
+  const char *cp1, *cp2, *r;
+  cp1 = strrchr(fname, '/');
+  cp2 = strrchr(fname, '\\');
+  if (cp1 && cp2) {
+r = (cp1
-#include "common/compat.h"
+#include "lib/cc/compat_compiler.h"
+#include "lib/log/torlog.h"
 #include "lib/testsupport/testsupport.h"
 
 /* Replace assert() with a variant that sends failures to the log before
@@ -192,6 +192,14 @@ void tor_bug_occurred_(const char *fname, unsigned int 
line,
const char *func, const char *expr,
int once);
 
+#ifdef _WIN32
+#define SHORT_FILE__ (tor_fix_source_file(__FILE__))
+const char *tor_fix_source_file(const char *fname);
+#else
+#define SHORT_FILE__ (__FILE__)
+#define tor_fix_source_file(s) (s)
+#endif /* defined(_WIN32) */
+
 #ifdef TOR_UNIT_TESTS
 void tor_capture_bugs_(int n);
 void tor_end_capture_bugs_(void);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] A pair of missing includes.

2018-06-26 Thread nickm
commit 7aecea79cb7f48ce5a8620b4a9fc2534289b4d5d
Author: Nick Mathewson 
Date:   Fri Jun 22 12:53:57 2018 -0400

A pair of missing includes.
---
 src/lib/container/smartlist.h  | 1 +
 src/lib/lock/compat_mutex_winthreads.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/lib/container/smartlist.h b/src/lib/container/smartlist.h
index dd455390e..7b1d06d7b 100644
--- a/src/lib/container/smartlist.h
+++ b/src/lib/container/smartlist.h
@@ -64,6 +64,7 @@ void smartlist_subtract(smartlist_t *sl1, const smartlist_t 
*sl2);
 
 /* smartlist_choose() is defined in crypto.[ch] */
 #ifdef DEBUG_SMARTLIST
+#include "lib/err/torerr.h"
 /** Return the number of items in sl.
  */
 static inline int smartlist_len(const smartlist_t *sl);
diff --git a/src/lib/lock/compat_mutex_winthreads.c 
b/src/lib/lock/compat_mutex_winthreads.c
index c92eb6291..32be288c7 100644
--- a/src/lib/lock/compat_mutex_winthreads.c
+++ b/src/lib/lock/compat_mutex_winthreads.c
@@ -4,6 +4,7 @@
 /* See LICENSE for licensing information */
 
 #include "lib/lock/compat_mutex.h"
+#include "lib/err/torerr.h"
 
 void
 tor_locking_init(void)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Add another include for windows, and change a log to a raw_assert

2018-06-26 Thread nickm
commit 145665abcbdb095aba59560db4ea8e3eee012de1
Author: Nick Mathewson 
Date:   Fri Jun 22 13:33:08 2018 -0400

Add another include for windows, and change a log to a raw_assert
---
 src/lib/wallclock/tor_gettimeofday.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/wallclock/tor_gettimeofday.c 
b/src/lib/wallclock/tor_gettimeofday.c
index 83081d9c9..74a640572 100644
--- a/src/lib/wallclock/tor_gettimeofday.c
+++ b/src/lib/wallclock/tor_gettimeofday.c
@@ -12,6 +12,7 @@
 #include "orconfig.h"
 #include "lib/err/torerr.h"
 #include "lib/wallclock/tor_gettimeofday.h"
+#include "lib/cc/torint.h"
 
 #include 
 #include 
@@ -55,8 +56,7 @@ tor_gettimeofday, (struct timeval *timeval))
   GetSystemTimeAsFileTime(_ft);
   if (ft.ft_64 < EPOCH_BIAS) {
 /* LCOV_EXCL_START */
-log_err(LD_GENERAL,"System time is before 1970; failing.");
-exit(1); // exit ok: system clock is broken.
+raw_assert_unreached_msg("System time is before 1970; failing.");
 /* LCOV_EXCL_STOP */
   }
   ft.ft_64 -= EPOCH_BIAS;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Move smartlist_add_{v, }asprintf into smartlist.[ch]

2018-06-26 Thread nickm
commit 3883338c8121212b3f6f9c020d489d50bbcdd855
Author: Nick Mathewson 
Date:   Fri Jun 22 09:26:19 2018 -0400

Move smartlist_add_{v,}asprintf into smartlist.[ch]

Now that I know that "strings" nests below "container", I know this
is safe.
---
 src/common/util.c | 24 
 src/common/util.h |  8 +---
 src/lib/container/smartlist.c | 25 +
 src/lib/container/smartlist.h |  5 +
 src/rust/build.rs |  1 +
 5 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/src/common/util.c b/src/common/util.c
index 597ff2c42..fc996f16c 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2595,30 +2595,6 @@ expand_filename(const char *filename)
 #endif /* defined(_WIN32) */
 }
 
-/** Append the string produced by tor_asprintf(pattern, ...)
- * to sl. */
-void
-smartlist_add_asprintf(struct smartlist_t *sl, const char *pattern, ...)
-{
-  va_list ap;
-  va_start(ap, pattern);
-  smartlist_add_vasprintf(sl, pattern, ap);
-  va_end(ap);
-}
-
-/** va_list-based backend of smartlist_add_asprintf. */
-void
-smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern,
-va_list args)
-{
-  char *str = NULL;
-
-  tor_vasprintf(, pattern, args);
-  tor_assert(str != NULL);
-
-  smartlist_add(sl, str);
-}
-
 /** Return a new list containing the filenames in the directory dirname.
  * Return NULL on error or if dirname is not a directory.
  */
diff --git a/src/common/util.h b/src/common/util.h
index 5833fe567..de6ba8ece 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -126,13 +126,6 @@ const char *escaped(const char *string);
 char *tor_escape_str_for_pt_args(const char *string,
  const char *chars_to_escape);
 
-struct smartlist_t;
-void smartlist_add_asprintf(struct smartlist_t *sl, const char *pattern, ...)
-  CHECK_PRINTF(2, 3);
-void smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern,
- va_list args)
-  CHECK_PRINTF(2, 0);
-
 /* Time helpers */
 long tv_udiff(const struct timeval *start, const struct timeval *end);
 long tv_mdiff(const struct timeval *start, const struct timeval *end);
@@ -250,6 +243,7 @@ typedef struct sized_chunk_t {
   const char *bytes;
   size_t len;
 } sized_chunk_t;
+struct smartlist_t;
 int write_chunks_to_file(const char *fname, const struct smartlist_t *chunks,
  int bin, int no_tempfile);
 int append_bytes_to_file(const char *fname, const char *str, size_t len,
diff --git a/src/lib/container/smartlist.c b/src/lib/container/smartlist.c
index 3a0a2d106..57b88415a 100644
--- a/src/lib/container/smartlist.c
+++ b/src/lib/container/smartlist.c
@@ -18,6 +18,7 @@
 #include "lib/defs/digest_sizes.h"
 #include "lib/ctime/di_ops.h"
 #include "lib/string/util_string.h"
+#include "lib/string/printf.h"
 
 #include 
 #include 
@@ -124,6 +125,30 @@ smartlist_add_strdup(struct smartlist_t *sl, const char 
*string)
   smartlist_add(sl, copy);
 }
 
+/** Append the string produced by tor_asprintf(pattern, ...)
+ * to sl. */
+void
+smartlist_add_asprintf(struct smartlist_t *sl, const char *pattern, ...)
+{
+  va_list ap;
+  va_start(ap, pattern);
+  smartlist_add_vasprintf(sl, pattern, ap);
+  va_end(ap);
+}
+
+/** va_list-based backend of smartlist_add_asprintf. */
+void
+smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern,
+va_list args)
+{
+  char *str = NULL;
+
+  tor_vasprintf(, pattern, args);
+  tor_assert(str != NULL);
+
+  smartlist_add(sl, str);
+}
+
 /** Remove all elements E from sl such that E==element.  Preserve
  * the order of any elements before E, but elements after E can be
  * rearranged.
diff --git a/src/lib/container/smartlist.h b/src/lib/container/smartlist.h
index 7b80a9fed..53a4948cf 100644
--- a/src/lib/container/smartlist.h
+++ b/src/lib/container/smartlist.h
@@ -37,6 +37,11 @@ void smartlist_clear(smartlist_t *sl);
 void smartlist_add(smartlist_t *sl, void *element);
 void smartlist_add_all(smartlist_t *sl, const smartlist_t *s2);
 void smartlist_add_strdup(struct smartlist_t *sl, const char *string);
+void smartlist_add_asprintf(struct smartlist_t *sl, const char *pattern, ...)
+  CHECK_PRINTF(2, 3);
+void smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern,
+ va_list args)
+  CHECK_PRINTF(2, 0);
 void smartlist_remove(smartlist_t *sl, const void *element);
 void smartlist_remove_keeporder(smartlist_t *sl, const void *element);
 void *smartlist_pop_last(smartlist_t *sl);
diff --git a/src/rust/build.rs b/src/rust/build.rs
index a4f38d3b4..5c80265e5 100644
--- a/src/rust/build.rs
+++ b/src/rust/build.rs
@@ -152,6 +152,7 @@ pub fn main() {
 cfg.component("tor-crypt-ops-testing");
 cfg.component("or-testing");
 cfg.component("tor-container-testing");
+cfg.component("tor-string-testing");
 

[tor-commits] [tor/master] Extract our code for answering "what time is it right now".

2018-06-26 Thread nickm
commit 9426751b72e922b5ee2b00bcc6158f5651a81014
Author: Nick Mathewson 
Date:   Thu Jun 21 17:33:49 2018 -0400

Extract our code for answering "what time is it right now".

The other time stuff is higher-level
---
 .gitignore   |  2 +
 Makefile.am  |  2 +
 src/common/compat_time.c | 53 ---
 src/common/compat_time.h |  5 +--
 src/common/log.c |  2 +
 src/common/util.c| 31 --
 src/common/util.h| 10 +
 src/include.am   |  1 +
 src/lib/wallclock/.may_include   |  4 ++
 src/lib/wallclock/approx_time.c  | 38 +
 src/lib/wallclock/approx_time.h  | 20 +
 src/lib/wallclock/include.am | 19 +
 src/lib/wallclock/tor_gettimeofday.c | 82 
 src/lib/wallclock/tor_gettimeofday.h | 15 +++
 14 files changed, 188 insertions(+), 96 deletions(-)

diff --git a/.gitignore b/.gitignore
index deb369381..343517fdf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -178,6 +178,8 @@ uptime-*.json
 /src/lib/libtor-tls.a
 /src/lib/libtor-tls-testing.a
 /src/lib/libtor-trace.a
+/src/lib/libtor-wallclock.a
+/src/lib/libtor-wallclock-testing.a
 
 # /src/or/
 /src/or/Makefile
diff --git a/Makefile.am b/Makefile.am
index 1b71e478f..a83041fbe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,7 @@ TOR_UTIL_LIBS = \
src/common/libor.a \
src/lib/libtor-container.a \
src/lib/libtor-malloc.a \
+src/lib/libtor-wallclock.a \
 src/lib/libtor-err.a \
src/lib/libtor-ctime.a
 
@@ -51,6 +52,7 @@ TOR_UTIL_TESTING_LIBS = \
src/common/libor-testing.a \
src/lib/libtor-container-testing.a \
src/lib/libtor-malloc-testing.a \
+src/lib/libtor-wallclock-testing.a \
 src/lib/libtor-err-testing.a \
 src/lib/libtor-ctime-testing.a
 
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 4bb64f1e8..d3cbd02c6 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -38,12 +38,6 @@
 #include "common/torlog.h"
 #include "common/util.h"
 
-#ifndef HAVE_GETTIMEOFDAY
-#ifdef HAVE_FTIME
-#include 
-#endif
-#endif
-
 #ifdef _WIN32
 #undef HAVE_CLOCK_GETTIME
 #endif
@@ -68,53 +62,6 @@ tor_sleep_msec(int msec)
 }
 #endif /* defined(TOR_UNIT_TESTS) */
 
-/** Set *timeval to the current time of day.  On error, log and terminate.
- * (Same as gettimeofday(timeval,NULL), but never returns -1.)
- */
-MOCK_IMPL(void,
-tor_gettimeofday, (struct timeval *timeval))
-{
-#ifdef _WIN32
-  /* Epoch bias copied from perl: number of units between windows epoch and
-   * Unix epoch. */
-#define EPOCH_BIAS U64_LITERAL(1164447360)
-#define UNITS_PER_SEC U64_LITERAL(1000)
-#define USEC_PER_SEC U64_LITERAL(100)
-#define UNITS_PER_USEC U64_LITERAL(10)
-  union {
-uint64_t ft_64;
-FILETIME ft_ft;
-  } ft;
-  /* number of 100-nsec units since Jan 1, 1601 */
-  GetSystemTimeAsFileTime(_ft);
-  if (ft.ft_64 < EPOCH_BIAS) {
-/* LCOV_EXCL_START */
-log_err(LD_GENERAL,"System time is before 1970; failing.");
-exit(1); // exit ok: system clock is broken.
-/* LCOV_EXCL_STOP */
-  }
-  ft.ft_64 -= EPOCH_BIAS;
-  timeval->tv_sec = (unsigned) (ft.ft_64 / UNITS_PER_SEC);
-  timeval->tv_usec = (unsigned) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC);
-#elif defined(HAVE_GETTIMEOFDAY)
-  if (gettimeofday(timeval, NULL)) {
-/* LCOV_EXCL_START */
-/* If gettimeofday dies, we have either given a bad timezone (we didn't),
-   or segfaulted.*/
-raw_assert_unreached_msg("gettimeofday failed");
-/* LCOV_EXCL_STOP */
-  }
-#elif defined(HAVE_FTIME)
-  struct timeb tb;
-  ftime();
-  timeval->tv_sec = tb.time;
-  timeval->tv_usec = tb.millitm * 1000;
-#else
-#error "No way to get time."
-#endif /* defined(_WIN32) || ... */
-  return;
-}
-
 #define ONE_MILLION ((int64_t) (1000 * 1000))
 #define ONE_BILLION ((int64_t) (1000 * 1000 * 1000))
 
diff --git a/src/common/compat_time.h b/src/common/compat_time.h
index 71d94cb86..2f7e87a63 100644
--- a/src/common/compat_time.h
+++ b/src/common/compat_time.h
@@ -19,6 +19,8 @@
 #define TOR_COMPAT_TIME_H
 
 #include "orconfig.h"
+#include "lib/wallclock/tor_gettimeofday.h"
+
 #ifdef _WIN32
 #undef HAVE_CLOCK_GETTIME
 #endif
@@ -200,8 +202,6 @@ monotime_coarse_diff_msec32(const monotime_coarse_t *start,
 #endif
 }
 
-MOCK_DECL(void, tor_gettimeofday, (struct timeval *timeval));
-
 #ifdef TOR_UNIT_TESTS
 void tor_sleep_msec(int msec);
 
@@ -230,4 +230,3 @@ void monotime_reset_ratchets_for_testing(void);
 #endif /* defined(COMPAT_TIME_PRIVATE) */
 
 #endif /* !defined(TOR_COMPAT_TIME_H) */
-
diff --git a/src/common/log.c b/src/common/log.c
index 5224a2197..f452c7413 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -35,6 +35,8 @@
 #include "common/torlog.h"
 #include "lib/container/smartlist.h"
 #include 

[tor-commits] [tor/master] Move ARRAY_LENGTH to compiler_compat.h

2018-06-26 Thread nickm
commit 1e07b4031e2613826cf7ff2838a2f0c8f03e81c2
Author: Nick Mathewson 
Date:   Fri Jun 22 08:41:57 2018 -0400

Move ARRAY_LENGTH to compiler_compat.h
---
 src/common/util.h| 2 --
 src/lib/cc/compat_compiler.h | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/common/util.h b/src/common/util.h
index f2df84b19..8977b460b 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -451,6 +451,4 @@ STATIC int format_helper_exit_status(unsigned char 
child_state,
 
 #endif /* defined(UTIL_PRIVATE) */
 
-#define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
-
 #endif /* !defined(TOR_UTIL_H) */
diff --git a/src/lib/cc/compat_compiler.h b/src/lib/cc/compat_compiler.h
index 763c3d06d..67d945cfa 100644
--- a/src/lib/cc/compat_compiler.h
+++ b/src/lib/cc/compat_compiler.h
@@ -253,4 +253,7 @@
  */
 #define STRUCT_VAR_P(st, off) ((void*) ( ((char*)(st)) + (off) ) )
 
+/** Macro: Yields the number of elements in array x. */
+#define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
+
 #endif /* !defined(TOR_COMPAT_H) */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Update permissible includes

2018-06-26 Thread nickm
commit d1cada5a8a7e1631e25f5f413c66d5c9e5113e7a
Author: Nick Mathewson 
Date:   Thu Jun 21 17:06:58 2018 -0400

Update permissible includes
---
 src/lib/container/.may_include | 15 +++
 src/lib/crypt_ops/.may_include |  2 ++
 src/lib/tls/.may_include   |  1 +
 3 files changed, 18 insertions(+)

diff --git a/src/lib/container/.may_include b/src/lib/container/.may_include
new file mode 100644
index 0..2dfa85b20
--- /dev/null
+++ b/src/lib/container/.may_include
@@ -0,0 +1,15 @@
+orconfig.h
+lib/cc/*.h
+lib/container/*.h
+lib/ctime/*.h
+lib/defs/*.h
+lib/malloc/*.h
+lib/err/*.h
+lib/testsupport/testsupport.h
+
+ht.h
+siphash.h
+
+# XXX I'd like to remove this.
+common/util.h
+common/util_bug.h
diff --git a/src/lib/crypt_ops/.may_include b/src/lib/crypt_ops/.may_include
index 94275c1d9..438e5fcdc 100644
--- a/src/lib/crypt_ops/.may_include
+++ b/src/lib/crypt_ops/.may_include
@@ -1,8 +1,10 @@
 orconfig.h
 lib/cc/*.h
+lib/container/*.h
 lib/crypt_ops/*.h
 lib/ctime/*.h
 lib/defs/*.h
+lib/malloc/*.h
 lib/err/*.h
 lib/testsupport/testsupport.h
 
diff --git a/src/lib/tls/.may_include b/src/lib/tls/.may_include
index 22792b6bf..8fdd62806 100644
--- a/src/lib/tls/.may_include
+++ b/src/lib/tls/.may_include
@@ -1,5 +1,6 @@
 orconfig.h
 lib/cc/*.h
+lib/container/*.h
 lib/crypt_ops/*.h
 lib/err/*.h
 lib/testsupport/testsupport.h



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Extract core part of gmtime_r, localtime_r (without logging)

2018-06-26 Thread nickm
commit bfb39164ce49450fad11611a129dd875acebde54
Author: Nick Mathewson 
Date:   Fri Jun 22 11:07:10 2018 -0400

Extract core part of gmtime_r, localtime_r (without logging)
---
 src/common/compat.c  | 172 --
 src/lib/log/torlog.c |   4 +-
 src/lib/wallclock/include.am |   2 +
 src/lib/wallclock/tm_cvt.c   | 193 +++
 src/lib/wallclock/tm_cvt.h   |  17 
 5 files changed, 230 insertions(+), 158 deletions(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index b4175c15a..351fa0563 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -127,6 +127,7 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt)
 #include "lib/log/torlog.h"
 #include "common/util.h"
 #include "lib/container/smartlist.h"
+#include "lib/wallclock/tm_cvt.h"
 #include "common/address.h"
 #include "common/sandbox.h"
 
@@ -2648,183 +2649,40 @@ compute_num_cpus(void)
   return num_cpus;
 }
 
-#if !defined(_WIN32)
-/** Defined iff we need to add locks when defining fake versions of reentrant
- * versions of time-related functions. */
-#define TIME_FNS_NEED_LOCKS
-#endif
-
-/** Helper: Deal with confused or out-of-bounds values from localtime_r and
- * friends.  (On some platforms, they can give out-of-bounds values or can
- * return NULL.)  If islocal, this is a localtime result; otherwise
- * it's from gmtime.  The function returns r, when given timep
- * as its input. If we need to store new results, store them in
- * resultbuf. */
-static struct tm *
-correct_tm(int islocal, const time_t *timep, struct tm *resultbuf,
-   struct tm *r)
-{
-  const char *outcome;
-
-  if (PREDICT_LIKELY(r)) {
-/* We can't strftime dates after  CE, and we want to avoid dates
- * before 1 CE (avoiding the year 0 issue and negative years). */
-if (r->tm_year > 8099) {
-  r->tm_year = 8099;
-  r->tm_mon = 11;
-  r->tm_mday = 31;
-  r->tm_yday = 364;
-  r->tm_wday = 6;
-  r->tm_hour = 23;
-  r->tm_min = 59;
-  r->tm_sec = 59;
-} else if (r->tm_year < (1-1900)) {
-  r->tm_year = (1-1900);
-  r->tm_mon = 0;
-  r->tm_mday = 1;
-  r->tm_yday = 0;
-  r->tm_wday = 0;
-  r->tm_hour = 0;
-  r->tm_min = 0;
-  r->tm_sec = 0;
-}
-return r;
-  }
-
-  /* If we get here, gmtime or localtime returned NULL. It might have done
-   * this because of overrun or underrun, or it might have done it because of
-   * some other weird issue. */
-  if (timep) {
-if (*timep < 0) {
-  r = resultbuf;
-  r->tm_year = 70; /* 1970 CE */
-  r->tm_mon = 0;
-  r->tm_mday = 1;
-  r->tm_yday = 0;
-  r->tm_wday = 0;
-  r->tm_hour = 0;
-  r->tm_min = 0 ;
-  r->tm_sec = 0;
-  outcome = "Rounding up to 1970";
-  goto done;
-} else if (*timep >= INT32_MAX) {
-  /* Rounding down to INT32_MAX isn't so great, but keep in mind that we
-   * only do it if gmtime/localtime tells us NULL. */
-  r = resultbuf;
-  r->tm_year = 137; /* 2037 CE */
-  r->tm_mon = 11;
-  r->tm_mday = 31;
-  r->tm_yday = 364;
-  r->tm_wday = 6;
-  r->tm_hour = 23;
-  r->tm_min = 59;
-  r->tm_sec = 59;
-  outcome = "Rounding down to 2037";
-  goto done;
-}
-  }
-
-  /* If we get here, then gmtime/localtime failed without getting an extreme
-   * value for *timep */
-  /* LCOV_EXCL_START */
-  tor_fragile_assert();
-  r = resultbuf;
-  memset(resultbuf, 0, sizeof(struct tm));
-  outcome="can't recover";
-  /* LCOV_EXCL_STOP */
- done:
-  log_warn(LD_BUG, "%s("I64_FORMAT") failed with error %s: %s",
-   islocal?"localtime":"gmtime",
-   timep?I64_PRINTF_ARG(*timep):0,
-   strerror(errno),
-   outcome);
-  return r;
-}
 
-/** @{ */
 /** As localtime_r, but defined for platforms that don't have it:
  *
  * Convert *timep to a struct tm in local time, and store the value in
  * *result.  Return the result on success, or NULL on failure.
  */
-#ifdef HAVE_LOCALTIME_R
 struct tm *
 tor_localtime_r(const time_t *timep, struct tm *result)
 {
-  struct tm *r;
-  r = localtime_r(timep, result);
-  return correct_tm(1, timep, result, r);
-}
-#elif defined(TIME_FNS_NEED_LOCKS)
-struct tm *
-tor_localtime_r(const time_t *timep, struct tm *result)
-{
-  struct tm *r;
-  static tor_mutex_t *m=NULL;
-  if (!m) { m=tor_mutex_new(); }
-  tor_assert(result);
-  tor_mutex_acquire(m);
-  r = localtime(timep);
-  if (r)
-memcpy(result, r, sizeof(struct tm));
-  tor_mutex_release(m);
-  return correct_tm(1, timep, result, r);
-}
-#else
-struct tm *
-tor_localtime_r(const time_t *timep, struct tm *result)
-{
-  struct tm *r;
-  tor_assert(result);
-  r = localtime(timep);
-  if (r)
-memcpy(result, r, sizeof(struct tm));
-  return correct_tm(1, timep, result, r);
+  char *err = NULL;
+  struct tm *r = tor_localtime_r_msg(timep, result, );
+  if (err) {
+log_warn(LD_BUG, "%s", err);
+tor_free(err);
+  }
+  

[tor-commits] [tor/master] Extract key string manipulation functions into a new library.

2018-06-26 Thread nickm
commit 1abadee3fd1c15f3720003c411ec6043c29d7c09
Author: Nick Mathewson 
Date:   Fri Jun 22 09:23:30 2018 -0400

Extract key string manipulation functions into a new library.
---
 .gitignore |   2 +
 Makefile.am|   2 +
 src/common/compat.c| 202 ---
 src/common/compat.h|  34 +-
 src/common/util.c  | 629 -
 src/common/util.h  |  35 +-
 src/common/util_format.c   |  37 +-
 src/common/util_format.h   |   2 -
 src/include.am |   1 +
 src/lib/container/.may_include |   1 +
 src/lib/container/map.c|   3 +-
 src/lib/container/smartlist.c  |   3 +-
 src/lib/crypt_ops/.may_include |   1 +
 src/lib/crypt_ops/crypto_format.c  |   1 +
 src/lib/crypt_ops/crypto_openssl_mgt.c |   2 +-
 src/lib/string/.may_include|   6 +
 src/lib/string/compat_ctype.c  |  67 
 src/lib/string/compat_ctype.h  |  60 
 src/lib/string/include.am  |  23 ++
 src/lib/string/printf.c| 152 
 src/lib/string/printf.h|  25 ++
 src/lib/string/scanf.c | 312 
 src/lib/string/scanf.h |  19 +
 src/lib/string/util_string.c   | 340 ++
 src/lib/string/util_string.h   |  42 +++
 25 files changed, 1068 insertions(+), 933 deletions(-)

diff --git a/.gitignore b/.gitignore
index 343517fdf..d03e1136d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -175,6 +175,8 @@ uptime-*.json
 /src/lib/libtor-err-testing.a
 /src/lib/libtor-malloc.a
 /src/lib/libtor-malloc-testing.a
+/src/lib/libtor-string.a
+/src/lib/libtor-string-testing.a
 /src/lib/libtor-tls.a
 /src/lib/libtor-tls-testing.a
 /src/lib/libtor-trace.a
diff --git a/Makefile.am b/Makefile.am
index a83041fbe..50d1408fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,6 +41,7 @@ endif
 TOR_UTIL_LIBS = \
src/common/libor.a \
src/lib/libtor-container.a \
+src/lib/libtor-string.a \
src/lib/libtor-malloc.a \
 src/lib/libtor-wallclock.a \
 src/lib/libtor-err.a \
@@ -51,6 +52,7 @@ TOR_UTIL_LIBS = \
 TOR_UTIL_TESTING_LIBS = \
src/common/libor-testing.a \
src/lib/libtor-container-testing.a \
+src/lib/libtor-string-testing.a \
src/lib/libtor-malloc-testing.a \
 src/lib/libtor-wallclock-testing.a \
 src/lib/libtor-err-testing.a \
diff --git a/src/common/compat.c b/src/common/compat.c
index 9462195ba..8929f2f3d 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -404,147 +404,6 @@ tor_munmap_file(tor_mmap_t *handle)
 #error "cannot implement tor_mmap_file"
 #endif /* defined(HAVE_MMAP) || ... || ... */
 
-/** Replacement for snprintf.  Differs from platform snprintf in two
- * ways: First, always NUL-terminates its output.  Second, always
- * returns -1 if the result is truncated.  (Note that this return
- * behavior does not conform to C99; it just happens to be
- * easier to emulate "return -1" with conformant implementations than
- * it is to emulate "return number that would be written" with
- * non-conformant implementations.) */
-int
-tor_snprintf(char *str, size_t size, const char *format, ...)
-{
-  va_list ap;
-  int r;
-  va_start(ap,format);
-  r = tor_vsnprintf(str,size,format,ap);
-  va_end(ap);
-  return r;
-}
-
-/** Replacement for vsnprintf; behavior differs as tor_snprintf differs from
- * snprintf.
- */
-int
-tor_vsnprintf(char *str, size_t size, const char *format, va_list args)
-{
-  int r;
-  if (size == 0)
-return -1; /* no place for the NUL */
-  if (size > SIZE_T_CEILING)
-return -1;
-#ifdef _WIN32
-  r = _vsnprintf(str, size, format, args);
-#else
-  r = vsnprintf(str, size, format, args);
-#endif
-  str[size-1] = '\0';
-  if (r < 0 || r >= (ssize_t)size)
-return -1;
-  return r;
-}
-
-/**
- * Portable asprintf implementation.  Does a printf() into a newly malloc'd
- * string.  Sets *strp to this string, and returns its length (not
- * including the terminating NUL character).
- *
- * You can treat this function as if its implementation were something like
-   
- char buf[_INFINITY_];
- tor_snprintf(buf, sizeof(buf), fmt, args);
- *strp = tor_strdup(buf);
- return strlen(*strp):
-   
- * Where _INFINITY_ is an imaginary constant so big that any string can fit
- * into it.
- */
-int
-tor_asprintf(char **strp, const char *fmt, ...)
-{
-  int r;
-  va_list args;
-  va_start(args, fmt);
-  r = tor_vasprintf(strp, fmt, args);
-  va_end(args);
-  if (!*strp || r < 0) {
-/* LCOV_EXCL_START */
-log_err(LD_BUG, "Internal error in asprintf");
-tor_assert(0);
-/* LCOV_EXCL_STOP */
-  }
-  return r;
-}
-
-/**
- * Portable vasprintf implementation.  Does a printf() into a newly malloc'd
- * string.  Differs from regular vasprintf in the 

[tor-commits] [tor/master] Automated fixup of include paths after torlog.h movement.

2018-06-26 Thread nickm
commit da4ae8a6b6bc45f301c1493bb55b09e2f1209ac2
Author: Nick Mathewson 
Date:   Fri Jun 22 10:32:10 2018 -0400

Automated fixup of include paths after torlog.h movement.
---
 src/common/address.c  | 2 +-
 src/common/buffers.c  | 2 +-
 src/common/compat.c   | 2 +-
 src/common/compat_libevent.c  | 2 +-
 src/common/compat_pthreads.c  | 2 +-
 src/common/compat_threads.c   | 2 +-
 src/common/compat_time.c  | 2 +-
 src/common/compat_winthreads.c| 2 +-
 src/common/confline.c | 2 +-
 src/common/memarea.c  | 2 +-
 src/common/procmon.h  | 2 +-
 src/common/sandbox.c  | 2 +-
 src/common/storagedir.c   | 2 +-
 src/common/timers.c   | 2 +-
 src/common/util.c | 2 +-
 src/common/util_bug.c | 2 +-
 src/common/util_format.c  | 2 +-
 src/common/util_process.c | 2 +-
 src/common/workqueue.c| 2 +-
 src/lib/compress/compress.c   | 2 +-
 src/lib/compress/compress_lzma.c  | 2 +-
 src/lib/compress/compress_none.c  | 2 +-
 src/lib/compress/compress_zlib.c  | 2 +-
 src/lib/compress/compress_zstd.c  | 2 +-
 src/lib/crypt_ops/aes.c   | 2 +-
 src/lib/crypt_ops/crypto.c| 2 +-
 src/lib/crypt_ops/crypto_curve25519.c | 2 +-
 src/lib/crypt_ops/crypto_dh.c | 2 +-
 src/lib/crypt_ops/crypto_digest.c | 2 +-
 src/lib/crypt_ops/crypto_ed25519.c| 2 +-
 src/lib/crypt_ops/crypto_format.c | 2 +-
 src/lib/crypt_ops/crypto_rand.c   | 2 +-
 src/lib/crypt_ops/crypto_rsa.c| 2 +-
 src/lib/crypt_ops/crypto_rsa.h| 2 +-
 src/lib/crypt_ops/crypto_util.c   | 2 +-
 src/lib/log/torlog.c  | 2 +-
 src/lib/tls/buffers_tls.c | 2 +-
 src/lib/tls/tortls.c  | 2 +-
 src/lib/trace/debug.h | 2 +-
 src/or/keypin.c   | 2 +-
 src/or/onion_ntor.c   | 2 +-
 src/or/or.h   | 2 +-
 src/or/parsecommon.c  | 2 +-
 src/or/torcert.c  | 2 +-
 src/test/fuzz/fuzz_http.c | 2 +-
 src/test/fuzz/fuzz_http_connect.c | 2 +-
 src/test/log_test_helpers.c   | 2 +-
 src/test/test_bt_cl.c | 2 +-
 src/test/test_logging.c   | 2 +-
 src/test/test_status.c| 2 +-
 src/test/test_tortls.c| 2 +-
 src/test/test_util_slow.c | 2 +-
 src/tools/tor-gencert.c   | 2 +-
 src/tools/tor-resolve.c   | 2 +-
 54 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/src/common/address.c b/src/common/address.c
index f2cddd394..42052f85e 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -39,7 +39,7 @@
 #include "common/util.h"
 #include "common/util_format.h"
 #include "common/address.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
 #include "lib/container/smartlist.h"
 #include "common/sandbox.h"
 #include "siphash.h"
diff --git a/src/common/buffers.c b/src/common/buffers.c
index 41f98ddf7..4e5f56c73 100644
--- a/src/common/buffers.c
+++ b/src/common/buffers.c
@@ -26,7 +26,7 @@
 #include "lib/compress/compress.h"
 #include "common/util.h"
 #include "lib/cc/torint.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
 #ifdef HAVE_UNISTD_H
 #include 
 #endif
diff --git a/src/common/compat.c b/src/common/compat.c
index 8929f2f3d..b4175c15a 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -124,7 +124,7 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt)
 #include 
 #endif
 
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
 #include "common/util.h"
 #include "lib/container/smartlist.h"
 #include "common/address.h"
diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index e3216bfc4..a0b9bc535 100644
--- a/src/common/compat_libevent.c
+++ b/src/common/compat_libevent.c
@@ -14,7 +14,7 @@
 #include "lib/crypt_ops/crypto_rand.h"
 
 #include "common/util.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
 
 #include 
 #include 
diff --git a/src/common/compat_pthreads.c b/src/common/compat_pthreads.c
index c2bde962f..e345cfef0 100644
--- a/src/common/compat_pthreads.c
+++ b/src/common/compat_pthreads.c
@@ -16,7 +16,7 @@
 #include 
 
 #include "common/compat.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
 #include "common/util.h"
 
 /** Wraps a void (*)(void*) function and its argument so we can
diff --git a/src/common/compat_threads.c b/src/common/compat_threads.c
index 89214ab1d..e66143b35 100644
--- a/src/common/compat_threads.c
+++ b/src/common/compat_threads.c
@@ -17,7 +17,7 @@
 #include "common/compat_threads.h"
 
 #include "common/util.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
 
 #ifdef HAVE_SYS_EVENTFD_H
 #include 
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 

[tor-commits] [tor/master] Extract strlcpy and strlcmp to libtor-string

2018-06-26 Thread nickm
commit 90a09df5ba7b3e55ea388a4cc9b92161442bb380
Author: Nick Mathewson 
Date:   Fri Jun 22 11:18:19 2018 -0400

Extract strlcpy and strlcmp to libtor-string
---
 src/common/.may_include|  2 --
 src/common/compat.c|  8 
 src/common/compat.h| 26 +-
 src/lib/string/.may_include|  3 +++
 src/lib/string/compat_string.c | 14 ++
 src/lib/string/compat_string.h | 39 +++
 src/lib/string/include.am  |  2 ++
 7 files changed, 59 insertions(+), 35 deletions(-)

diff --git a/src/common/.may_include b/src/common/.may_include
index d2a3d2fff..484b57e10 100644
--- a/src/common/.may_include
+++ b/src/common/.may_include
@@ -8,7 +8,5 @@ linux_syscalls.inc
 micro-revision.i
 siphash.h
 src/ext/timeouts/timeout.c
-strlcat.c
-strlcpy.c
 tor_queue.h
 tor_readpassphrase.h
diff --git a/src/common/compat.c b/src/common/compat.c
index 351fa0563..1dcd06581 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -131,14 +131,6 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt)
 #include "common/address.h"
 #include "common/sandbox.h"
 
-/* Inline the strl functions if the platform doesn't have them. */
-#ifndef HAVE_STRLCPY
-#include "strlcpy.c"
-#endif
-#ifndef HAVE_STRLCAT
-#include "strlcat.c"
-#endif
-
 /* When set_max_file_descriptors() is called, update this with the max file
  * descriptor value so we can use it to check the limit when opening a new
  * socket. Default value is what Debian sets as the default hard limit. */
diff --git a/src/common/compat.h b/src/common/compat.h
index 21fd0211a..605438cc6 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -48,6 +48,7 @@
 #include "lib/cc/compat_compiler.h"
 #include "common/compat_time.h"
 #include "lib/string/compat_ctype.h"
+#include "lib/string/compat_string.h"
 #include "lib/string/printf.h"
 
 #include 
@@ -55,31 +56,6 @@
 
 /* = Compiler compatibility */
 
-/* = String compatibility */
-#ifdef _WIN32
-/* Windows names string functions differently from most other platforms. */
-#define strncasecmp _strnicmp
-#define strcasecmp _stricmp
-#endif
-
-#if defined __APPLE__
-/* On OSX 10.9 and later, the overlap-checking code for strlcat would
- * appear to have a severe bug that can sometimes cause aborts in Tor.
- * Instead, use the non-checking variants.  This is sad.
- *
- * See https://trac.torproject.org/projects/tor/ticket/15205
- */
-#undef strlcat
-#undef strlcpy
-#endif /* defined __APPLE__ */
-
-#ifndef HAVE_STRLCAT
-size_t strlcat(char *dst, const char *src, size_t siz) ATTR_NONNULL((1,2));
-#endif
-#ifndef HAVE_STRLCPY
-size_t strlcpy(char *dst, const char *src, size_t siz) ATTR_NONNULL((1,2));
-#endif
-
 /** Represents an mmaped file. Allocated via tor_mmap_file; freed with
  * tor_munmap_file. */
 typedef struct tor_mmap_t {
diff --git a/src/lib/string/.may_include b/src/lib/string/.may_include
index 8781566d9..c5d771861 100644
--- a/src/lib/string/.may_include
+++ b/src/lib/string/.may_include
@@ -4,3 +4,6 @@ lib/err/*.h
 lib/malloc/*.h
 lib/ctime/*.h
 lib/string/*.h
+
+strlcat.c
+strlcpy.c
diff --git a/src/lib/string/compat_string.c b/src/lib/string/compat_string.c
new file mode 100644
index 0..6df1bc4a1
--- /dev/null
+++ b/src/lib/string/compat_string.c
@@ -0,0 +1,14 @@
+/* Copyright (c) 2003-2004, Roger Dingledine
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#include "lib/string/compat_string.h"
+
+/* Inline the strl functions if the platform doesn't have them. */
+#ifndef HAVE_STRLCPY
+#include "strlcpy.c"
+#endif
+#ifndef HAVE_STRLCAT
+#include "strlcat.c"
+#endif
diff --git a/src/lib/string/compat_string.h b/src/lib/string/compat_string.h
new file mode 100644
index 0..212d08b7a
--- /dev/null
+++ b/src/lib/string/compat_string.h
@@ -0,0 +1,39 @@
+/* Copyright (c) 2003-2004, Roger Dingledine
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef TOR_COMPAT_STRING_H
+#define TOR_COMPAT_STRING_H
+
+#include "orconfig.h"
+#include "lib/cc/compat_compiler.h"
+
+#include 
+
+/* = String compatibility */
+#ifdef _WIN32
+/* Windows names string functions differently from most other platforms. */
+#define strncasecmp _strnicmp
+#define strcasecmp _stricmp
+#endif
+
+#if defined __APPLE__
+/* On OSX 10.9 and later, the overlap-checking code for strlcat would
+ * appear to have a severe bug that can sometimes cause aborts in Tor.
+ * Instead, use the non-checking variants.  This is sad.
+ *
+ * See https://trac.torproject.org/projects/tor/ticket/15205
+ */
+#undef strlcat
+#undef strlcpy
+#endif /* defined __APPLE__ */
+
+#ifndef HAVE_STRLCAT
+size_t strlcat(char *dst, const char *src, size_t siz) ATTR_NONNULL((1,2));
+#endif
+#ifndef HAVE_STRLCPY
+size_t strlcpy(char *dst, 

[tor-commits] [tor/master] Extract simple integer math into its own module

2018-06-26 Thread nickm
commit 2cf033f238c111bef62552da16117568435d3a18
Author: Nick Mathewson 
Date:   Fri Jun 22 09:48:24 2018 -0400

Extract simple integer math into its own module
---
 .gitignore   |   2 +
 Makefile.am  |   2 +
 src/common/util.c| 161 ---
 src/common/util.h|  29 +--
 src/include.am   |   1 +
 src/lib/container/.may_include   |   2 +-
 src/lib/container/bloomfilt.c|   2 +-
 src/lib/crypt_ops/.may_include   |   1 +
 src/lib/crypt_ops/crypto_pwbox.c |   2 +-
 src/lib/intmath/.may_include |   4 +
 src/lib/intmath/addsub.c |  20 +
 src/lib/intmath/addsub.h |  13 
 src/lib/intmath/bits.c   |  88 +
 src/lib/intmath/bits.h   |  16 
 src/lib/intmath/cmp.h|  20 +
 src/lib/intmath/include.am   |  22 ++
 src/lib/intmath/muldiv.c |  75 ++
 src/lib/intmath/muldiv.h |  22 ++
 src/rust/build.rs|   1 +
 19 files changed, 294 insertions(+), 189 deletions(-)

diff --git a/.gitignore b/.gitignore
index d03e1136d..6a48ba275 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,6 +173,8 @@ uptime-*.json
 /src/lib/libtor-ctime-testing.a
 /src/lib/libtor-err.a
 /src/lib/libtor-err-testing.a
+/src/lib/libtor-intmath.a
+/src/lib/libtor-intmath-testing.a
 /src/lib/libtor-malloc.a
 /src/lib/libtor-malloc-testing.a
 /src/lib/libtor-string.a
diff --git a/Makefile.am b/Makefile.am
index 50d1408fe..172ab36f6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,6 +45,7 @@ TOR_UTIL_LIBS = \
src/lib/libtor-malloc.a \
 src/lib/libtor-wallclock.a \
 src/lib/libtor-err.a \
+src/lib/libtor-intmath.a \
src/lib/libtor-ctime.a
 
 # Variants of the above for linking the testing variant of tor (for coverage
@@ -56,6 +57,7 @@ TOR_UTIL_TESTING_LIBS = \
src/lib/libtor-malloc-testing.a \
 src/lib/libtor-wallclock-testing.a \
 src/lib/libtor-err-testing.a \
+src/lib/libtor-intmath.a \
 src/lib/libtor-ctime-testing.a
 
 # Internal crypto libraries used in Tor
diff --git a/src/common/util.c b/src/common/util.c
index fc996f16c..5efbb2bbf 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -166,105 +166,6 @@ tor_llround(double d)
 #endif /* defined(HAVE_LLROUND) || ... */
 }
 
-/** Returns floor(log2(u64)).  If u64 is 0, (incorrectly) returns 0. */
-int
-tor_log2(uint64_t u64)
-{
-  int r = 0;
-  if (u64 >= (U64_LITERAL(1)<<32)) {
-u64 >>= 32;
-r = 32;
-  }
-  if (u64 >= (U64_LITERAL(1)<<16)) {
-u64 >>= 16;
-r += 16;
-  }
-  if (u64 >= (U64_LITERAL(1)<<8)) {
-u64 >>= 8;
-r += 8;
-  }
-  if (u64 >= (U64_LITERAL(1)<<4)) {
-u64 >>= 4;
-r += 4;
-  }
-  if (u64 >= (U64_LITERAL(1)<<2)) {
-u64 >>= 2;
-r += 2;
-  }
-  if (u64 >= (U64_LITERAL(1)<<1)) {
-// u64 >>= 1; // not using this any more.
-r += 1;
-  }
-  return r;
-}
-
-/** Return the power of 2 in range [1,UINT64_MAX] closest to u64.  If
- * there are two powers of 2 equally close, round down. */
-uint64_t
-round_to_power_of_2(uint64_t u64)
-{
-  int lg2;
-  uint64_t low;
-  uint64_t high;
-  if (u64 == 0)
-return 1;
-
-  lg2 = tor_log2(u64);
-  low = U64_LITERAL(1) << lg2;
-
-  if (lg2 == 63)
-return low;
-
-  high = U64_LITERAL(1) << (lg2+1);
-  if (high - u64 < u64 - low)
-return high;
-  else
-return low;
-}
-
-/** Return the lowest x such that x is at least number, and x modulo
- * divisor == 0.  If no such x can be expressed as an unsigned, return
- * UINT_MAX. Asserts if divisor is zero. */
-unsigned
-round_to_next_multiple_of(unsigned number, unsigned divisor)
-{
-  tor_assert(divisor > 0);
-  if (UINT_MAX - divisor + 1 < number)
-return UINT_MAX;
-  number += divisor - 1;
-  number -= number % divisor;
-  return number;
-}
-
-/** Return the lowest x such that x is at least number, and x modulo
- * divisor == 0. If no such x can be expressed as a uint32_t, return
- * UINT32_MAX. Asserts if divisor is zero. */
-uint32_t
-round_uint32_to_next_multiple_of(uint32_t number, uint32_t divisor)
-{
-  tor_assert(divisor > 0);
-  if (UINT32_MAX - divisor + 1 < number)
-return UINT32_MAX;
-
-  number += divisor - 1;
-  number -= number % divisor;
-  return number;
-}
-
-/** Return the lowest x such that x is at least number, and x modulo
- * divisor == 0. If no such x can be expressed as a uint64_t, return
- * UINT64_MAX. Asserts if divisor is zero. */
-uint64_t
-round_uint64_to_next_multiple_of(uint64_t number, uint64_t divisor)
-{
-  tor_assert(divisor > 0);
-  if (UINT64_MAX - divisor + 1 < number)
-return UINT64_MAX;
-  number += divisor - 1;
-  number -= number % divisor;
-  return number;
-}
-
 /** Transform a random value p from the uniform distribution in
  * [0.0, 1.0[ into a Laplace distributed value with location parameter
  * mu and scale parameter b. Truncate the final result

[tor-commits] [tor/master] Extract smartlist.h from container.h

2018-06-26 Thread nickm
commit de508c5f50af855742b59579afd6c9c328eb7cd6
Author: Nick Mathewson 
Date:   Thu Jun 21 17:00:48 2018 -0400

Extract smartlist.h from container.h
---
 src/common/address.c  |  2 +-
 src/common/address.h  | 23 ---
 src/common/compat.c   |  3 +--
 src/common/confline.c |  3 +--
 src/common/confline.h |  5 ++---
 src/common/log.c  |  2 +-
 src/common/storagedir.c   |  3 +--
 src/common/util.c |  2 +-
 src/common/util_bug.c |  4 +++-
 src/lib/container/container.h |  2 --
 src/lib/crypt_ops/crypto_digest.c |  2 +-
 src/lib/crypt_ops/crypto_digest.h |  3 ++-
 src/lib/crypt_ops/crypto_format.c |  3 +--
 src/lib/crypt_ops/crypto_rand.c   |  3 +--
 src/lib/tls/tortls.c  |  2 +-
 src/or/parsecommon.c  |  2 +-
 src/or/parsecommon.h  | 13 +++--
 src/or/protover.h | 11 +--
 18 files changed, 42 insertions(+), 46 deletions(-)

diff --git a/src/common/address.c b/src/common/address.c
index f9e5cc5c7..f2cddd394 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -40,7 +40,7 @@
 #include "common/util_format.h"
 #include "common/address.h"
 #include "common/torlog.h"
-#include "lib/container/container.h"
+#include "lib/container/smartlist.h"
 #include "common/sandbox.h"
 #include "siphash.h"
 
diff --git a/src/common/address.h b/src/common/address.h
index b8fccd81e..87f29fc28 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -207,10 +207,11 @@ const char * fmt_addr32(uint32_t addr);
 
 MOCK_DECL(int,get_interface_address6,(int severity, sa_family_t family,
 tor_addr_t *addr));
-void interface_address6_list_free_(smartlist_t * addrs);// 
+struct smartlist_t;
+void interface_address6_list_free_(struct smartlist_t * addrs);// 
 #define interface_address6_list_free(addrs) \
-  FREE_AND_NULL(smartlist_t, interface_address6_list_free_, (addrs))
-MOCK_DECL(smartlist_t *,get_interface_address6_list,(int severity,
+  FREE_AND_NULL(struct smartlist_t, interface_address6_list_free_, (addrs))
+MOCK_DECL(struct smartlist_t *,get_interface_address6_list,(int severity,
  sa_family_t family,
  int include_internal));
 
@@ -336,7 +337,7 @@ MOCK_DECL(int,get_interface_address,(int severity, uint32_t 
*addr));
  * Returns NULL on failure.
  * Use free_interface_address_list to free the returned list.
  */
-static inline smartlist_t *
+static inline struct smartlist_t *
 get_interface_address_list(int severity, int include_internal)
 {
   return get_interface_address6_list(severity, AF_INET, include_internal);
@@ -347,30 +348,30 @@ int tor_addr_port_eq(const tor_addr_port_t *a,
  const tor_addr_port_t *b);
 
 #ifdef ADDRESS_PRIVATE
-MOCK_DECL(smartlist_t *,get_interface_addresses_raw,(int severity,
+MOCK_DECL(struct smartlist_t *,get_interface_addresses_raw,(int severity,
  sa_family_t family));
 MOCK_DECL(int,get_interface_address6_via_udp_socket_hack,(int severity,
   sa_family_t family,
   tor_addr_t *addr));
 
 #ifdef HAVE_IFADDRS_TO_SMARTLIST
-STATIC smartlist_t *ifaddrs_to_smartlist(const struct ifaddrs *ifa,
+STATIC struct smartlist_t *ifaddrs_to_smartlist(const struct ifaddrs *ifa,
  sa_family_t family);
-STATIC smartlist_t *get_interface_addresses_ifaddrs(int severity,
+STATIC struct smartlist_t *get_interface_addresses_ifaddrs(int severity,
 sa_family_t family);
 #endif /* defined(HAVE_IFADDRS_TO_SMARTLIST) */
 
 #ifdef HAVE_IP_ADAPTER_TO_SMARTLIST
-STATIC smartlist_t *ip_adapter_addresses_to_smartlist(
+STATIC struct smartlist_t *ip_adapter_addresses_to_smartlist(
 const IP_ADAPTER_ADDRESSES *addresses);
-STATIC smartlist_t *get_interface_addresses_win32(int severity,
+STATIC struct smartlist_t *get_interface_addresses_win32(int severity,
   sa_family_t family);
 #endif /* defined(HAVE_IP_ADAPTER_TO_SMARTLIST) */
 
 #ifdef HAVE_IFCONF_TO_SMARTLIST
-STATIC smartlist_t *ifreq_to_smartlist(char *ifr,
+STATIC struct smartlist_t *ifreq_to_smartlist(char *ifr,
size_t buflen);
-STATIC smartlist_t *get_interface_addresses_ioctl(int severity,
+STATIC struct smartlist_t *get_interface_addresses_ioctl(int severity,
   sa_family_t family);
 #endif /* defined(HAVE_IFCONF_TO_SMARTLIST) */
 
diff --git a/src/common/compat.c b/src/common/compat.c
index 577ebe757..9462195ba 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -126,7 +126,7 @@ 

[tor-commits] [tor/master] Remove compat.h as unneeded from log.c and torlog.h

2018-06-26 Thread nickm
commit 0932f322911f41e72b5155d06775658039814a39
Author: Nick Mathewson 
Date:   Thu Jun 21 17:35:56 2018 -0400

Remove compat.h as unneeded from log.c and torlog.h
---
 src/common/log.c | 2 +-
 src/common/torlog.h  | 4 +++-
 src/common/util_format.c | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/common/log.c b/src/common/log.c
index f452c7413..bb4b1e121 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -29,12 +29,12 @@
 #ifdef HAVE_FCNTL_H
 #include 
 #endif
-#include "common/compat.h"
 #include "common/util.h"
 #define LOG_PRIVATE
 #include "common/torlog.h"
 #include "lib/container/smartlist.h"
 #include "lib/err/torerr.h"
+#include "lib/malloc/util_malloc.h"
 #include "lib/wallclock/tor_gettimeofday.h"
 #include "lib/wallclock/approx_time.h"
 
diff --git a/src/common/torlog.h b/src/common/torlog.h
index 66141ab0a..6814cc9d0 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -12,7 +12,9 @@
 
 #ifndef TOR_TORLOG_H
 
-#include "common/compat.h"
+#include 
+#include "lib/cc/torint.h"
+#include "lib/cc/compat_compiler.h"
 #include "lib/testsupport/testsupport.h"
 
 #ifdef HAVE_SYSLOG_H
diff --git a/src/common/util_format.c b/src/common/util_format.c
index 420d8a1a8..713e87129 100644
--- a/src/common/util_format.c
+++ b/src/common/util_format.c
@@ -12,6 +12,7 @@
  */
 
 #include "orconfig.h"
+#include 
 #include "common/torlog.h"
 #include "common/util.h"
 #include "common/util_format.h"
@@ -532,4 +533,3 @@ base16_decode(char *dest, size_t destlen, const char *src, 
size_t srclen)
 
   return (int) (dest-dest_orig);
 }
-



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Extract the locking and logging code

2018-06-26 Thread nickm
commit 97b15a1d7c51764888d2172711e3f3a71fb01916
Author: Nick Mathewson 
Date:   Fri Jun 22 10:30:45 2018 -0400

Extract the locking and logging code

The locking code gets its own module, since it's more fundamental
than the higher-level locking code.

Extracting the logging code was the whole point here. :)
---
 .gitignore |  2 +
 Makefile.am|  4 ++
 src/common/compat_pthreads.c   | 80 +---
 src/common/compat_threads.c| 28 --
 src/common/compat_threads.h| 42 +--
 src/common/compat_winthreads.c | 27 --
 src/common/include.am  |  2 -
 src/common/util.c  | 51 --
 src/common/util.h  | 37 -
 src/include.am |  2 +
 src/lib/lock/.may_include  |  5 ++
 src/lib/lock/compat_mutex.c| 34 
 src/lib/lock/compat_mutex.h| 60 +
 src/lib/lock/compat_mutex_pthreads.c   | 97 ++
 src/lib/lock/compat_mutex_winthreads.c | 39 ++
 src/lib/lock/include.am| 24 +
 src/lib/log/.may_include   |  3 ++
 src/lib/log/include.am | 19 +++
 src/lib/log/ratelim.c  | 54 +++
 src/lib/log/ratelim.h  | 46 
 src/{common/log.c => lib/log/torlog.c} | 24 +++--
 src/{common => lib/log}/torlog.h   |  0
 src/rust/build.rs  |  1 +
 23 files changed, 413 insertions(+), 268 deletions(-)

diff --git a/.gitignore b/.gitignore
index 6a48ba275..f141fee17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -175,6 +175,8 @@ uptime-*.json
 /src/lib/libtor-err-testing.a
 /src/lib/libtor-intmath.a
 /src/lib/libtor-intmath-testing.a
+/src/lib/libtor-lock.a
+/src/lib/libtor-lock-testing.a
 /src/lib/libtor-malloc.a
 /src/lib/libtor-malloc-testing.a
 /src/lib/libtor-string.a
diff --git a/Makefile.am b/Makefile.am
index 172ab36f6..b6200c6a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,8 @@ endif
 # "Common" libraries used to link tor's utility code.
 TOR_UTIL_LIBS = \
src/common/libor.a \
+src/lib/libtor-log.a \
+src/lib/libtor-lock.a \
src/lib/libtor-container.a \
 src/lib/libtor-string.a \
src/lib/libtor-malloc.a \
@@ -52,6 +54,8 @@ TOR_UTIL_LIBS = \
 # and tests)
 TOR_UTIL_TESTING_LIBS = \
src/common/libor-testing.a \
+src/lib/libtor-log-testing.a \
+src/lib/libtor-lock-testing.a \
src/lib/libtor-container-testing.a \
 src/lib/libtor-string-testing.a \
src/lib/libtor-malloc-testing.a \
diff --git a/src/common/compat_pthreads.c b/src/common/compat_pthreads.c
index c2f8609db..c2bde962f 100644
--- a/src/common/compat_pthreads.c
+++ b/src/common/compat_pthreads.c
@@ -91,83 +91,6 @@ spawn_exit(void)
   pthread_exit(NULL);
 }
 
-/** A mutex attribute that we're going to use to tell pthreads that we want
- * "recursive" mutexes (i.e., once we can re-lock if we're already holding
- * them.) */
-static pthread_mutexattr_t attr_recursive;
-
-/** Initialize mutex so it can be locked.  Every mutex must be set
- * up with tor_mutex_init() or tor_mutex_new(); not both. */
-void
-tor_mutex_init(tor_mutex_t *mutex)
-{
-  if (PREDICT_UNLIKELY(!threads_initialized))
-tor_threads_init(); // LCOV_EXCL_LINE
-  const int err = pthread_mutex_init(>mutex, _recursive);
-  if (PREDICT_UNLIKELY(err)) {
-// LCOV_EXCL_START
-raw_assert_unreached_msg("Error creating a mutex.");
-// LCOV_EXCL_STOP
-  }
-}
-
-/** As tor_mutex_init, but initialize a mutex suitable that may be
- * non-recursive, if the OS supports that. */
-void
-tor_mutex_init_nonrecursive(tor_mutex_t *mutex)
-{
-  int err;
-  if (!threads_initialized)
-tor_threads_init(); // LCOV_EXCL_LINE
-  err = pthread_mutex_init(>mutex, NULL);
-  if (PREDICT_UNLIKELY(err)) {
-// LCOV_EXCL_START
-raw_assert_unreached_msg("Error creating a mutex.");
-// LCOV_EXCL_STOP
-  }
-}
-
-/** Wait until m is free, then acquire it. */
-void
-tor_mutex_acquire(tor_mutex_t *m)
-{
-  int err;
-  raw_assert(m);
-  err = pthread_mutex_lock(>mutex);
-  if (PREDICT_UNLIKELY(err)) {
-// LCOV_EXCL_START
-raw_assert_unreached_msg("Error locking a mutex.");
-// LCOV_EXCL_STOP
-  }
-}
-/** Release the lock m so another thread can have it. */
-void
-tor_mutex_release(tor_mutex_t *m)
-{
-  int err;
-  raw_assert(m);
-  err = pthread_mutex_unlock(>mutex);
-  if (PREDICT_UNLIKELY(err)) {
-// LCOV_EXCL_START
-raw_assert_unreached_msg("Error unlocking a mutex.");
-// LCOV_EXCL_STOP
-  }
-}
-/** Clean up the mutex m so that it no longer uses any system
- * resources.  Does not free m.  This function must only be called on
- * mutexes from tor_mutex_init(). */
-void

[tor-commits] [tor/master] Remove the util_bug.h include from smartlist.h.

2018-06-26 Thread nickm
commit b2d4e786b7ed2563461513e36c7e75bea1f70be8
Author: Nick Mathewson 
Date:   Fri Jun 22 10:50:12 2018 -0400

Remove the util_bug.h include from smartlist.h.

This change makes a whole bunch of things in torlog.c break, since
apparently I did not find all the fd dependencies.
---
 src/common/util.h  |  1 +
 src/lib/compress/.may_include  |  1 +
 src/lib/container/smartlist.c  |  3 +++
 src/lib/container/smartlist.h  | 18 ++
 src/lib/crypt_ops/.may_include |  1 +
 src/lib/ctime/.may_include |  5 ++---
 src/lib/ctime/di_ops.c | 17 ++---
 src/lib/log/.may_include   | 10 ++
 src/lib/log/ratelim.c  |  1 +
 src/lib/log/ratelim.h  |  2 ++
 src/lib/log/torlog.c   |  4 +++-
 src/lib/tls/.may_include   |  1 +
 src/lib/trace/.may_include |  4 +---
 13 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/src/common/util.h b/src/common/util.h
index 9936c421d..3f6476d75 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -31,6 +31,7 @@
 #include "lib/intmath/addsub.h"
 #include "lib/intmath/muldiv.h"
 #include "lib/intmath/cmp.h"
+#include "lib/log/ratelim.h"
 #include "common/util_bug.h"
 
 #ifndef O_BINARY
diff --git a/src/lib/compress/.may_include b/src/lib/compress/.may_include
index 70528a7df..3f69dd133 100644
--- a/src/lib/compress/.may_include
+++ b/src/lib/compress/.may_include
@@ -1,6 +1,7 @@
 orconfig.h
 lib/cc/*.h
 lib/compress/*.h
+lib/log/*.h
 
 # XXX I'd like to remove this.
 common/*.h
diff --git a/src/lib/container/smartlist.c b/src/lib/container/smartlist.c
index 57b88415a..9d405085b 100644
--- a/src/lib/container/smartlist.c
+++ b/src/lib/container/smartlist.c
@@ -17,9 +17,12 @@
 #include "lib/malloc/util_malloc.h"
 #include "lib/defs/digest_sizes.h"
 #include "lib/ctime/di_ops.h"
+#include "lib/string/compat_ctype.h"
 #include "lib/string/util_string.h"
 #include "lib/string/printf.h"
 
+#include "common/util_bug.h"
+
 #include 
 #include 
 
diff --git a/src/lib/container/smartlist.h b/src/lib/container/smartlist.h
index 53a4948cf..dd455390e 100644
--- a/src/lib/container/smartlist.h
+++ b/src/lib/container/smartlist.h
@@ -7,8 +7,10 @@
 #define TOR_SMARTLIST_H
 
 #include 
+#include 
+
 #include "lib/cc/compat_compiler.h"
-#include "common/util_bug.h"
+#include "lib/cc/torint.h"
 #include "lib/testsupport/testsupport.h"
 
 /** A resizeable list of pointers, with associated helpful functionality.
@@ -66,22 +68,22 @@ void smartlist_subtract(smartlist_t *sl1, const smartlist_t 
*sl2);
  */
 static inline int smartlist_len(const smartlist_t *sl);
 static inline int smartlist_len(const smartlist_t *sl) {
-  tor_assert(sl);
+  raw_assert(sl);
   return (sl)->num_used;
 }
 /** Return the idxth element of sl.
  */
 static inline void *smartlist_get(const smartlist_t *sl, int idx);
 static inline void *smartlist_get(const smartlist_t *sl, int idx) {
-  tor_assert(sl);
-  tor_assert(idx>=0);
-  tor_assert(sl->num_used > idx);
+  raw_assert(sl);
+  raw_assert(idx>=0);
+  raw_assert(sl->num_used > idx);
   return sl->list[idx];
 }
 static inline void smartlist_set(smartlist_t *sl, int idx, void *val) {
-  tor_assert(sl);
-  tor_assert(idx>=0);
-  tor_assert(sl->num_used > idx);
+  raw_assert(sl);
+  raw_assert(idx>=0);
+  raw_assert(sl->num_used > idx);
   sl->list[idx] = val;
 }
 #else /* !(defined(DEBUG_SMARTLIST)) */
diff --git a/src/lib/crypt_ops/.may_include b/src/lib/crypt_ops/.may_include
index 1b9289b2f..8031bb9bc 100644
--- a/src/lib/crypt_ops/.may_include
+++ b/src/lib/crypt_ops/.may_include
@@ -9,6 +9,7 @@ lib/err/*.h
 lib/intmath/*.h
 lib/string/*.h
 lib/testsupport/testsupport.h
+lib/log/*.h
 
 trunnel/pwbox.h
 
diff --git a/src/lib/ctime/.may_include b/src/lib/ctime/.may_include
index 72d854c37..e74669bce 100644
--- a/src/lib/ctime/.may_include
+++ b/src/lib/ctime/.may_include
@@ -1,6 +1,5 @@
 orconfig.h
 lib/cc/*.h
 lib/ctime/*.h
-
-#  I'd like to remove this
-common/util.h
+lib/err/*.h
+lib/malloc/*.h
diff --git a/src/lib/ctime/di_ops.c b/src/lib/ctime/di_ops.c
index 407131c44..287ff6080 100644
--- a/src/lib/ctime/di_ops.c
+++ b/src/lib/ctime/di_ops.c
@@ -8,7 +8,10 @@
 
 #include "orconfig.h"
 #include "lib/ctime/di_ops.h"
-#include "common/util.h"
+#include "lib/err/torerr.h"
+#include "lib/malloc/util_malloc.h"
+
+#include 
 
 /**
  * Timing-safe version of memcmp.  As memcmp, compare the sz bytes at
@@ -170,8 +173,8 @@ dimap_add_entry(di_digest256_map_t **map,
   di_digest256_map_t *new_ent;
   {
 void *old_val = dimap_search(*map, key, NULL);
-tor_assert(! old_val);
-tor_assert(val);
+raw_assert(! old_val);
+raw_assert(val);
   }
   new_ent = tor_malloc_zero(sizeof(di_digest256_map_t));
   new_ent->next = *map;
@@ -263,10 +266,10 @@ select_array_member_cumulative_timei(const uint64_t 
*entries, int n_entries,
   rand_val = INT64_MAX;
 }
   }
-  tor_assert(total_so_far == total);
-  tor_assert(n_chosen == 1);
-  tor_assert(i_chosen >= 

[tor-commits] [tor/master] Expunge container.h

2018-06-26 Thread nickm
commit c2a558a346cf1f4db8751eb5c6dfecaab760a652
Author: Nick Mathewson 
Date:   Thu Jun 21 17:03:45 2018 -0400

Expunge container.h
---
 src/common/address.h  | 1 -
 src/common/compat_time.c  | 1 -
 src/common/compat_winthreads.c| 1 -
 src/common/memarea.c  | 1 -
 src/lib/container/container.h | 9 -
 src/lib/container/include.am  | 1 -
 src/lib/container/map.c   | 2 +-
 src/lib/crypt_ops/crypto.c| 1 -
 src/lib/crypt_ops/crypto_curve25519.c | 1 -
 src/or/hs_client.c| 1 -
 src/or/hs_descriptor.h| 1 -
 src/test/test_bridges.c   | 1 -
 src/test/test_dir_common.c| 1 -
 src/test/test_guardfraction.c | 1 -
 src/test/test_routerlist.c| 1 -
 15 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/src/common/address.h b/src/common/address.h
index 87f29fc28..8abff072c 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -15,7 +15,6 @@
 #include "orconfig.h"
 #include "lib/cc/torint.h"
 #include "common/compat.h"
-#include "lib/container/container.h"
 #include "common/util_bug.h"
 
 #ifdef ADDRESS_PRIVATE
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 032c4e43a..4bb64f1e8 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -37,7 +37,6 @@
 #include "lib/err/torerr.h"
 #include "common/torlog.h"
 #include "common/util.h"
-#include "lib/container/container.h"
 
 #ifndef HAVE_GETTIMEOFDAY
 #ifdef HAVE_FTIME
diff --git a/src/common/compat_winthreads.c b/src/common/compat_winthreads.c
index eeb0b9751..807c7b4ae 100644
--- a/src/common/compat_winthreads.c
+++ b/src/common/compat_winthreads.c
@@ -16,7 +16,6 @@
 #include 
 #include 
 #include "common/util.h"
-#include "lib/container/container.h"
 #include "common/torlog.h"
 
 /* This value is more or less total cargo-cult */
diff --git a/src/common/memarea.c b/src/common/memarea.c
index ef6b78ecc..ec10f0222 100644
--- a/src/common/memarea.c
+++ b/src/common/memarea.c
@@ -13,7 +13,6 @@
 #include "common/util.h"
 #include "common/compat.h"
 #include "common/torlog.h"
-#include "lib/container/container.h"
 
 #ifndef DISABLE_MEMORY_SENTINELS
 
diff --git a/src/lib/container/container.h b/src/lib/container/container.h
deleted file mode 100644
index 3dc70e635..0
--- a/src/lib/container/container.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (c) 2003-2004, Roger Dingledine
- * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2018, The Tor Project, Inc. */
-/* See LICENSE for licensing information */
-
-#ifndef TOR_CONTAINER_H
-#define TOR_CONTAINER_H
-
-#endif /* !defined(TOR_CONTAINER_H) */
diff --git a/src/lib/container/include.am b/src/lib/container/include.am
index e2994674a..0e7acdff9 100644
--- a/src/lib/container/include.am
+++ b/src/lib/container/include.am
@@ -19,7 +19,6 @@ src_lib_libtor_container_testing_a_CFLAGS = $(AM_CFLAGS) 
$(TEST_CFLAGS)
 noinst_HEADERS +=  \
src/lib/container/bitarray.h\
src/lib/container/bloomfilt.h   \
-   src/lib/container/container.h   \
src/lib/container/map.h \
src/lib/container/order.h   \
src/lib/container/smartlist.h
diff --git a/src/lib/container/map.c b/src/lib/container/map.c
index 508680e4a..f6b0f73c1 100644
--- a/src/lib/container/map.c
+++ b/src/lib/container/map.c
@@ -158,7 +158,7 @@ digest256map_assign_key(digest256map_entry_t *ent, const 
uint8_t *key)
 
 /**
  * Macro: implement all the functions for a map that are declared in
- * container.h by the DECLARE_MAP_FNS() macro.  You must additionally define a
+ * map.h by the DECLARE_MAP_FNS() macro.  You must additionally define a
  * prefix_entry_free_() function to free entries (and their keys), a
  * prefix_assign_tmp_key() function to temporarily set a stack-allocated
  * entry to hold a key, and a prefix_assign_key() function to set a
diff --git a/src/lib/crypt_ops/crypto.c b/src/lib/crypt_ops/crypto.c
index 9b1c38041..46026b6ac 100644
--- a/src/lib/crypt_ops/crypto.c
+++ b/src/lib/crypt_ops/crypto.c
@@ -66,7 +66,6 @@ ENABLE_GCC_WARNING(redundant-decls)
 #include "lib/cc/torint.h"
 #include "lib/crypt_ops/aes.h"
 #include "common/util.h"
-#include "lib/container/container.h"
 #include "common/compat.h"
 #include "common/sandbox.h"
 #include "common/util_format.h"
diff --git a/src/lib/crypt_ops/crypto_curve25519.c 
b/src/lib/crypt_ops/crypto_curve25519.c
index 1e7a45625..03225f1c1 100644
--- a/src/lib/crypt_ops/crypto_curve25519.c
+++ b/src/lib/crypt_ops/crypto_curve25519.c
@@ -20,7 +20,6 @@
 #ifdef HAVE_SYS_STAT_H
 #include 
 #endif
-#include "lib/container/container.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
 #include "lib/crypt_ops/crypto_digest.h"
 #include "lib/crypt_ops/crypto_format.h"
diff --git 

[tor-commits] [tor/master] Rectify include paths after container split (automatic)

2018-06-26 Thread nickm
commit b8be8265b6dc477efe591ccdb14fcd4b044dd241
Author: Nick Mathewson 
Date:   Thu Jun 21 15:40:15 2018 -0400

Rectify include paths after container split (automatic)
---
 src/common/address.c  | 2 +-
 src/common/address.h  | 2 +-
 src/common/address_set.c  | 2 +-
 src/common/compat.c   | 2 +-
 src/common/compat_time.c  | 2 +-
 src/common/compat_winthreads.c| 2 +-
 src/common/confline.c | 2 +-
 src/common/confline.h | 2 +-
 src/common/log.c  | 2 +-
 src/common/memarea.c  | 2 +-
 src/common/sandbox.c  | 2 +-
 src/common/storagedir.c   | 2 +-
 src/common/util.c | 2 +-
 src/common/util_bug.c | 2 +-
 src/lib/container/container.c | 2 +-
 src/lib/crypt_ops/crypto.c| 2 +-
 src/lib/crypt_ops/crypto_curve25519.c | 2 +-
 src/lib/crypt_ops/crypto_digest.c | 2 +-
 src/lib/crypt_ops/crypto_digest.h | 2 +-
 src/lib/crypt_ops/crypto_format.c | 2 +-
 src/lib/crypt_ops/crypto_rand.c   | 2 +-
 src/lib/tls/tortls.c  | 2 +-
 src/or/hs_client.c| 2 +-
 src/or/hs_descriptor.h| 2 +-
 src/or/or.h   | 2 +-
 src/or/parsecommon.h  | 2 +-
 src/or/protover.h | 2 +-
 src/test/test_bridges.c   | 2 +-
 src/test/test_dir_common.c| 2 +-
 src/test/test_guardfraction.c | 2 +-
 src/test/test_routerlist.c| 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/src/common/address.c b/src/common/address.c
index f135f1ffd..27f8c4efe 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -40,7 +40,7 @@
 #include "common/util_format.h"
 #include "common/address.h"
 #include "common/torlog.h"
-#include "common/container.h"
+#include "lib/container/container.h"
 #include "common/sandbox.h"
 
 #ifdef HAVE_SYS_TIME_H
diff --git a/src/common/address.h b/src/common/address.h
index 6986143f6..b8fccd81e 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -15,7 +15,7 @@
 #include "orconfig.h"
 #include "lib/cc/torint.h"
 #include "common/compat.h"
-#include "common/container.h"
+#include "lib/container/container.h"
 #include "common/util_bug.h"
 
 #ifdef ADDRESS_PRIVATE
diff --git a/src/common/address_set.c b/src/common/address_set.c
index 65c4cbf1e..d30343b1c 100644
--- a/src/common/address_set.c
+++ b/src/common/address_set.c
@@ -14,7 +14,7 @@
 #include "common/address_set.h"
 #include "common/address.h"
 #include "common/compat.h"
-#include "common/container.h"
+#include "lib/container/container.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "common/util.h"
 #include "siphash.h"
diff --git a/src/common/compat.c b/src/common/compat.c
index dece798bc..577ebe757 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -126,7 +126,7 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt)
 
 #include "common/torlog.h"
 #include "common/util.h"
-#include "common/container.h"
+#include "lib/container/container.h"
 #include "common/address.h"
 #include "common/sandbox.h"
 
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index da323e55a..032c4e43a 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -37,7 +37,7 @@
 #include "lib/err/torerr.h"
 #include "common/torlog.h"
 #include "common/util.h"
-#include "common/container.h"
+#include "lib/container/container.h"
 
 #ifndef HAVE_GETTIMEOFDAY
 #ifdef HAVE_FTIME
diff --git a/src/common/compat_winthreads.c b/src/common/compat_winthreads.c
index 95e70d06b..eeb0b9751 100644
--- a/src/common/compat_winthreads.c
+++ b/src/common/compat_winthreads.c
@@ -16,7 +16,7 @@
 #include 
 #include 
 #include "common/util.h"
-#include "common/container.h"
+#include "lib/container/container.h"
 #include "common/torlog.h"
 
 /* This value is more or less total cargo-cult */
diff --git a/src/common/confline.c b/src/common/confline.c
index 2ea2e9c3b..7343c5f52 100644
--- a/src/common/confline.c
+++ b/src/common/confline.c
@@ -8,7 +8,7 @@
 #include "common/confline.h"
 #include "common/torlog.h"
 #include "common/util.h"
-#include "common/container.h"
+#include "lib/container/container.h"
 
 static int config_get_lines_aux(const char *string, config_line_t **result,
 int extended, int allow_include,
diff --git a/src/common/confline.h b/src/common/confline.h
index 4cc8286fc..10af34a0a 100644
--- a/src/common/confline.h
+++ b/src/common/confline.h
@@ -7,7 +7,7 @@
 #ifndef TOR_CONFLINE_H
 #define TOR_CONFLINE_H
 
-#include "common/container.h"
+#include "lib/container/container.h"
 
 /** Ordinary configuration line. */
 #define CONFIG_LINE_NORMAL 0
diff --git a/src/common/log.c b/src/common/log.c
index 928a3fba8..8ea686a12 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -33,7 +33,7 @@
 #include "common/util.h"
 #define 

[tor-commits] [tor/master] Refactor container into a library.

2018-06-26 Thread nickm
commit 77dff00b18fc70acdb2939dd20197a0044d41fe5
Author: Nick Mathewson 
Date:   Thu Jun 21 15:39:36 2018 -0400

Refactor container into a library.
---
 .gitignore|  2 ++
 Makefile.am   |  2 ++
 src/common/include.am |  2 --
 src/include.am|  1 +
 src/{common => lib/container}/container.c |  0
 src/{common => lib/container}/container.h |  0
 src/lib/container/include.am  | 17 +
 src/rust/build.rs |  1 +
 8 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index c5da8e423..deb369381 100644
--- a/.gitignore
+++ b/.gitignore
@@ -165,6 +165,8 @@ uptime-*.json
 /src/lib/libcurve25519_donna.a
 /src/lib/libtor-compress.a
 /src/lib/libtor-compress-testing.a
+/src/lib/libtor-container.a
+/src/lib/libtor-container-testing.a
 /src/lib/libtor-crypt-ops.a
 /src/lib/libtor-crypt-ops-testing.a
 /src/lib/libtor-ctime.a
diff --git a/Makefile.am b/Makefile.am
index 960417df9..1b71e478f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,7 @@ endif
 # "Common" libraries used to link tor's utility code.
 TOR_UTIL_LIBS = \
src/common/libor.a \
+   src/lib/libtor-container.a \
src/lib/libtor-malloc.a \
 src/lib/libtor-err.a \
src/lib/libtor-ctime.a
@@ -48,6 +49,7 @@ TOR_UTIL_LIBS = \
 # and tests)
 TOR_UTIL_TESTING_LIBS = \
src/common/libor-testing.a \
+   src/lib/libtor-container-testing.a \
src/lib/libtor-malloc-testing.a \
 src/lib/libtor-err-testing.a \
 src/lib/libtor-ctime-testing.a
diff --git a/src/common/include.am b/src/common/include.am
index 29bbdd769..422397886 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -38,7 +38,6 @@ LIBOR_A_SRC = \
   src/common/compat_threads.c  \
   src/common/compat_time.c \
   src/common/confline.c\
-  src/common/container.c   \
   src/common/log.c \
   src/common/memarea.c \
   src/common/util.c\
@@ -87,7 +86,6 @@ COMMONHEADERS = \
   src/common/compat_threads.h  \
   src/common/compat_time.h \
   src/common/confline.h\
-  src/common/container.h   \
   src/common/handles.h \
   src/common/memarea.h \
   src/common/linux_syscalls.inc\
diff --git a/src/include.am b/src/include.am
index 46569a4b4..9fa901c41 100644
--- a/src/include.am
+++ b/src/include.am
@@ -3,6 +3,7 @@ include src/lib/err/include.am
 include src/lib/cc/include.am
 include src/lib/ctime/include.am
 include src/lib/compress/include.am
+include src/lib/container/include.am
 include src/lib/crypt_ops/include.am
 include src/lib/include.libdonna.am
 include src/lib/malloc/include.am
diff --git a/src/common/container.c b/src/lib/container/container.c
similarity index 100%
rename from src/common/container.c
rename to src/lib/container/container.c
diff --git a/src/common/container.h b/src/lib/container/container.h
similarity index 100%
rename from src/common/container.h
rename to src/lib/container/container.h
diff --git a/src/lib/container/include.am b/src/lib/container/include.am
new file mode 100644
index 0..d7648c80c
--- /dev/null
+++ b/src/lib/container/include.am
@@ -0,0 +1,17 @@
+
+noinst_LIBRARIES += src/lib/libtor-container.a
+
+if UNITTESTS_ENABLED
+noinst_LIBRARIES += src/lib/libtor-container-testing.a
+endif
+
+src_lib_libtor_container_a_SOURCES =   \
+   src/lib/container/container.c
+
+src_lib_libtor_container_testing_a_SOURCES = \
+   $(src_lib_libtor_container_a_SOURCES)
+src_lib_libtor_container_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
+src_lib_libtor_container_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
+
+noinst_HEADERS +=  \
+   src/lib/container/container.h
diff --git a/src/rust/build.rs b/src/rust/build.rs
index acbedd4d4..a4f38d3b4 100644
--- a/src/rust/build.rs
+++ b/src/rust/build.rs
@@ -151,6 +151,7 @@ pub fn main() {
 // moving forward!
 cfg.component("tor-crypt-ops-testing");
 cfg.component("or-testing");
+cfg.component("tor-container-testing");
 cfg.component("tor-malloc");
 cfg.component("tor-err-testing");
 cfg.component("or-event-testing");



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Remove map from container.h

2018-06-26 Thread nickm
commit 9cf6fc91b1d0870dab8bf87feb9132e7e0de2808
Author: Nick Mathewson 
Date:   Thu Jun 21 16:52:58 2018 -0400

Remove map from container.h
---
 src/common/address.c   | 2 +-
 src/common/sandbox.c   | 4 +++-
 src/lib/container/container.h  | 1 -
 src/lib/crypt_ops/.may_include | 2 ++
 src/lib/crypt_ops/crypto.c | 2 ++
 src/or/or.h| 3 ++-
 6 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/common/address.c b/src/common/address.c
index 27f8c4efe..f9e5cc5c7 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -42,6 +42,7 @@
 #include "common/torlog.h"
 #include "lib/container/container.h"
 #include "common/sandbox.h"
+#include "siphash.h"
 
 #ifdef HAVE_SYS_TIME_H
 #include 
@@ -2169,4 +2170,3 @@ tor_addr_port_eq(const tor_addr_port_t *a,
 {
   return tor_addr_eq(>addr, >addr) && a->port == b->port;
 }
-
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index e67cedf0b..7e88ec9dd 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -33,7 +33,7 @@
 #include 
 
 #include "common/sandbox.h"
-#include "lib/container/container.h"
+#include "lib/container/map.h"
 #include "lib/err/torerr.h"
 #include "common/torlog.h"
 #include "lib/cc/torint.h"
@@ -42,6 +42,8 @@
 
 #include "ht.h"
 
+#include "siphash.h"
+
 #define DEBUGGING_CLOSE
 
 #if defined(USE_LIBSECCOMP)
diff --git a/src/lib/container/container.h b/src/lib/container/container.h
index 1d0a47749..6912ae31e 100644
--- a/src/lib/container/container.h
+++ b/src/lib/container/container.h
@@ -7,6 +7,5 @@
 #define TOR_CONTAINER_H
 
 #include "lib/container/smartlist.h"
-#include "lib/container/map.h"
 
 #endif /* !defined(TOR_CONTAINER_H) */
diff --git a/src/lib/crypt_ops/.may_include b/src/lib/crypt_ops/.may_include
index 4f415f876..94275c1d9 100644
--- a/src/lib/crypt_ops/.may_include
+++ b/src/lib/crypt_ops/.may_include
@@ -11,5 +11,7 @@ trunnel/pwbox.h
 keccak-tiny/*.h
 ed25519/*.h
 
+siphash.h
+
 # XXX I'd like to remove this.
 common/*.h
diff --git a/src/lib/crypt_ops/crypto.c b/src/lib/crypt_ops/crypto.c
index de7e271d3..9b1c38041 100644
--- a/src/lib/crypt_ops/crypto.c
+++ b/src/lib/crypt_ops/crypto.c
@@ -73,6 +73,8 @@ ENABLE_GCC_WARNING(redundant-decls)
 
 #include "keccak-tiny/keccak-tiny.h"
 
+#include "siphash.h"
+
 /** Boolean: has OpenSSL's crypto been initialized? */
 static int crypto_early_initialized_ = 0;
 
diff --git a/src/or/or.h b/src/or/or.h
index c70123934..5c2a6d300 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -69,7 +69,8 @@
 #include "lib/crypt_ops/crypto_hkdf.h"
 #include "lib/tls/tortls.h"
 #include "common/torlog.h"
-#include "lib/container/container.h"
+#include "lib/container/smartlist.h"
+#include "lib/container/map.h"
 #include "lib/compress/compress.h"
 #include "common/address.h"
 #include "common/compat_libevent.h"



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Move STRUCT_VAR_P to compat_compiler.

2018-06-26 Thread nickm
commit 479c2ab503a3a051200339a7df9a99dcfb0ed976
Author: Nick Mathewson 
Date:   Thu Jun 21 16:29:24 2018 -0400

Move STRUCT_VAR_P to compat_compiler.
---
 src/common/util.h | 11 ---
 src/lib/cc/compat_compiler.h  | 11 +++
 src/lib/container/smartlist.c |  3 ++-
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/common/util.h b/src/common/util.h
index 1c889082b..916bddc1f 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -41,17 +41,6 @@ uint64_t tor_ntohll(uint64_t a);
 
 void tor_log_mallinfo(int severity);
 
-/** Macro: yield a pointer to the field at position off within the
- * structure st.  Example:
- * 
- *   struct a { int foo; int bar; } x;
- *   off_t bar_offset = offsetof(struct a, bar);
- *   int *bar_p = STRUCT_VAR_P(, bar_offset);
- *   *bar_p = 3;
- * 
- */
-#define STRUCT_VAR_P(st, off) ((void*) ( ((char*)(st)) + (off) ) )
-
 /** Macro: yield a pointer to an enclosing structure given a pointer to
  * a substructure at offset off. Example:
  * 
diff --git a/src/lib/cc/compat_compiler.h b/src/lib/cc/compat_compiler.h
index 31e84bcc5..763c3d06d 100644
--- a/src/lib/cc/compat_compiler.h
+++ b/src/lib/cc/compat_compiler.h
@@ -242,4 +242,15 @@
 #error Unknown: SIZEOF_INTPTR_T
 #endif /* (SIZEOF_INTPTR_T == SIZEOF_INT) || ... */
 
+/** Macro: yield a pointer to the field at position off within the
+ * structure st.  Example:
+ * 
+ *   struct a { int foo; int bar; } x;
+ *   off_t bar_offset = offsetof(struct a, bar);
+ *   int *bar_p = STRUCT_VAR_P(, bar_offset);
+ *   *bar_p = 3;
+ * 
+ */
+#define STRUCT_VAR_P(st, off) ((void*) ( ((char*)(st)) + (off) ) )
+
 #endif /* !defined(TOR_COMPAT_H) */
diff --git a/src/lib/container/smartlist.c b/src/lib/container/smartlist.c
index 6aef72854..0fe11c670 100644
--- a/src/lib/container/smartlist.c
+++ b/src/lib/container/smartlist.c
@@ -13,7 +13,8 @@
 
 #include "lib/malloc/util_malloc.h"
 #include "lib/container/smartlist.h"
-#include "common/util.h"
+#include "lib/err/torerr.h"
+#include "common/util.h" // For strstrip.
 #include "lib/crypt_ops/crypto_digest.h"
 #include "lib/ctime/di_ops.h"
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Remove container->crypto dependency

2018-06-26 Thread nickm
commit 932b4d0a4342ec281b6f692f23453d6c46026c18
Author: Nick Mathewson 
Date:   Thu Jun 21 16:34:00 2018 -0400

Remove container->crypto dependency

Containers were using crypto_digest.h, just to see the value of
DIGEST_LEN.  Moved those constants into a new defs module.
---
 src/include.am|  1 +
 src/lib/container/map.c   |  2 +-
 src/lib/container/smartlist.c |  2 +-
 src/lib/crypt_ops/.may_include|  1 +
 src/lib/crypt_ops/crypto_digest.c |  1 -
 src/lib/crypt_ops/crypto_digest.h | 10 +-
 src/lib/defs/.may_include |  1 +
 src/lib/defs/digest_sizes.h   | 18 ++
 src/lib/defs/include.am   |  3 +++
 9 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/src/include.am b/src/include.am
index 9fa901c41..581fd69c7 100644
--- a/src/include.am
+++ b/src/include.am
@@ -5,6 +5,7 @@ include src/lib/ctime/include.am
 include src/lib/compress/include.am
 include src/lib/container/include.am
 include src/lib/crypt_ops/include.am
+include src/lib/defs/include.am
 include src/lib/include.libdonna.am
 include src/lib/malloc/include.am
 include src/lib/testsupport/include.am
diff --git a/src/lib/container/map.c b/src/lib/container/map.c
index 227fb8f5e..508680e4a 100644
--- a/src/lib/container/map.c
+++ b/src/lib/container/map.c
@@ -13,7 +13,7 @@
 
 #include "lib/container/map.h"
 #include "lib/ctime/di_ops.h"
-#include "lib/crypt_ops/crypto_digest.h"
+#include "lib/defs/digest_sizes.h"
 
 #include "common/util_bug.h"
 #include "common/util.h" // For strlower
diff --git a/src/lib/container/smartlist.c b/src/lib/container/smartlist.c
index 0fe11c670..2d861f566 100644
--- a/src/lib/container/smartlist.c
+++ b/src/lib/container/smartlist.c
@@ -15,7 +15,7 @@
 #include "lib/container/smartlist.h"
 #include "lib/err/torerr.h"
 #include "common/util.h" // For strstrip.
-#include "lib/crypt_ops/crypto_digest.h"
+#include "lib/defs/digest_sizes.h"
 #include "lib/ctime/di_ops.h"
 
 #include 
diff --git a/src/lib/crypt_ops/.may_include b/src/lib/crypt_ops/.may_include
index 6eefec158..4f415f876 100644
--- a/src/lib/crypt_ops/.may_include
+++ b/src/lib/crypt_ops/.may_include
@@ -2,6 +2,7 @@ orconfig.h
 lib/cc/*.h
 lib/crypt_ops/*.h
 lib/ctime/*.h
+lib/defs/*.h
 lib/err/*.h
 lib/testsupport/testsupport.h
 
diff --git a/src/lib/crypt_ops/crypto_digest.c 
b/src/lib/crypt_ops/crypto_digest.c
index d746aaaca..b6ec2b284 100644
--- a/src/lib/crypt_ops/crypto_digest.c
+++ b/src/lib/crypt_ops/crypto_digest.c
@@ -580,4 +580,3 @@ crypto_xof_free_(crypto_xof_t *xof)
   memwipe(xof, 0, sizeof(crypto_xof_t));
   tor_free(xof);
 }
-
diff --git a/src/lib/crypt_ops/crypto_digest.h 
b/src/lib/crypt_ops/crypto_digest.h
index 129258245..63e8bec70 100644
--- a/src/lib/crypt_ops/crypto_digest.h
+++ b/src/lib/crypt_ops/crypto_digest.h
@@ -17,14 +17,7 @@
 
 #include "lib/container/container.h"
 #include "lib/cc/torint.h"
-
-/** Length of the output of our message digest. */
-#define DIGEST_LEN 20
-/** Length of the output of our second (improved) message digests.  (For now
- * this is just sha256, but it could be any other 256-bit digest.) */
-#define DIGEST256_LEN 32
-/** Length of the output of our 64-bit optimized message digests (SHA512). */
-#define DIGEST512_LEN 64
+#include "lib/defs/digest_sizes.h"
 
 /** Length of a sha1 message digest when encoded in base32 with trailing =
  * signs removed. */
@@ -133,4 +126,3 @@ digest_algorithm_t 
crypto_digest_get_algorithm(crypto_digest_t *digest);
 #endif
 
 #endif /* !defined(TOR_CRYPTO_DIGEST_H) */
-
diff --git a/src/lib/defs/.may_include b/src/lib/defs/.may_include
new file mode 100644
index 0..2b06e8519
--- /dev/null
+++ b/src/lib/defs/.may_include
@@ -0,0 +1 @@
+orconfig.h
diff --git a/src/lib/defs/digest_sizes.h b/src/lib/defs/digest_sizes.h
new file mode 100644
index 0..f426fff20
--- /dev/null
+++ b/src/lib/defs/digest_sizes.h
@@ -0,0 +1,18 @@
+/* Copyright (c) 2001, Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef TOR_DIGEST_SIZES_H
+#define TOR_DIGEST_SIZES_H
+
+/** Length of the output of our message digest. */
+#define DIGEST_LEN 20
+/** Length of the output of our second (improved) message digests.  (For now
+ * this is just sha256, but it could be any other 256-bit digest.) */
+#define DIGEST256_LEN 32
+/** Length of the output of our 64-bit optimized message digests (SHA512). */
+#define DIGEST512_LEN 64
+
+#endif
diff --git a/src/lib/defs/include.am b/src/lib/defs/include.am
new file mode 100644
index 0..861406c01
--- /dev/null
+++ b/src/lib/defs/include.am
@@ -0,0 +1,3 @@
+
+noinst_HEADERS += \
+   digest_sizes.h



___
tor-commits mailing list
tor-commits@lists.torproject.org

[tor-commits] [tor/master] Remove bloom filters, order statistics, and bitarrays from container.h

2018-06-26 Thread nickm
commit 50a5954003a0478273d9e2c1a546e641e763a997
Author: Nick Mathewson 
Date:   Thu Jun 21 16:48:54 2018 -0400

Remove bloom filters, order statistics, and bitarrays from container.h
---
 src/common/address_set.c  | 3 +--
 src/common/util_bug.c | 1 +
 src/lib/container/container.h | 3 ---
 src/lib/crypt_ops/crypto_digest.h | 3 +--
 src/lib/defs/include.am   | 2 +-
 src/or/confparse.c| 4 ++--
 src/or/consdiff.c | 1 -
 src/or/consdiff.h | 3 ++-
 src/or/dirauth/dirvote.c  | 2 ++
 src/or/dirserv.c  | 3 ++-
 src/or/entrynodes.c   | 3 ++-
 src/or/geoip.c| 3 ++-
 src/or/rephist.c  | 4 +++-
 src/or/routerlist.c   | 3 ++-
 src/or/routerparse.c  | 3 ++-
 src/or/routerset.c| 3 +--
 src/or/routerset.h| 3 ++-
 src/test/bench.c  | 3 ++-
 src/test/test_circuitlist.c   | 3 ++-
 src/test/test_containers.c| 5 -
 src/test/test_entrynodes.c| 3 ++-
 21 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/src/common/address_set.c b/src/common/address_set.c
index d30343b1c..f4c5f581c 100644
--- a/src/common/address_set.c
+++ b/src/common/address_set.c
@@ -14,7 +14,7 @@
 #include "common/address_set.h"
 #include "common/address.h"
 #include "common/compat.h"
-#include "lib/container/container.h"
+#include "lib/container/bitarray.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "common/util.h"
 #include "siphash.h"
@@ -126,4 +126,3 @@ address_set_probably_contains(address_set_t *set,
   }
   return matches == N_BITS_PER_ITEM;
 }
-
diff --git a/src/common/util_bug.c b/src/common/util_bug.c
index 3b249bdfc..3d86131e7 100644
--- a/src/common/util_bug.c
+++ b/src/common/util_bug.c
@@ -12,6 +12,7 @@
 #include "common/torlog.h"
 #include "lib/err/backtrace.h"
 #include "lib/container/container.h"
+#include "lib/malloc/util_malloc.h"
 
 #ifdef __COVERITY__
 int bug_macro_deadcode_dummy__ = 0;
diff --git a/src/lib/container/container.h b/src/lib/container/container.h
index ba8983846..1d0a47749 100644
--- a/src/lib/container/container.h
+++ b/src/lib/container/container.h
@@ -8,8 +8,5 @@
 
 #include "lib/container/smartlist.h"
 #include "lib/container/map.h"
-#include "lib/container/bitarray.h"
-#include "lib/container/bloomfilt.h"
-#include "lib/container/order.h"
 
 #endif /* !defined(TOR_CONTAINER_H) */
diff --git a/src/lib/crypt_ops/crypto_digest.h 
b/src/lib/crypt_ops/crypto_digest.h
index 63e8bec70..628224a03 100644
--- a/src/lib/crypt_ops/crypto_digest.h
+++ b/src/lib/crypt_ops/crypto_digest.h
@@ -13,11 +13,10 @@
 #ifndef TOR_CRYPTO_DIGEST_H
 #define TOR_CRYPTO_DIGEST_H
 
-#include 
-
 #include "lib/container/container.h"
 #include "lib/cc/torint.h"
 #include "lib/defs/digest_sizes.h"
+#include "lib/malloc/util_malloc.h"
 
 /** Length of a sha1 message digest when encoded in base32 with trailing =
  * signs removed. */
diff --git a/src/lib/defs/include.am b/src/lib/defs/include.am
index 861406c01..ff48cff07 100644
--- a/src/lib/defs/include.am
+++ b/src/lib/defs/include.am
@@ -1,3 +1,3 @@
 
 noinst_HEADERS += \
-   digest_sizes.h
+   src/lib/defs/digest_sizes.h
diff --git a/src/or/confparse.c b/src/or/confparse.c
index e88c4f72d..b38e06c6a 100644
--- a/src/or/confparse.c
+++ b/src/or/confparse.c
@@ -1,4 +1,3 @@
-
 /* Copyright (c) 2001 Matej Pfajfar.
  * Copyright (c) 2001-2004, Roger Dingledine.
  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
@@ -26,6 +25,8 @@
 #include "or/confparse.h"
 #include "or/routerset.h"
 
+#include "lib/container/bitarray.h"
+
 static uint64_t config_parse_memunit(const char *s, int *ok);
 static int config_parse_msec_interval(const char *s, int *ok);
 static int config_parse_interval(const char *s, int *ok);
@@ -1186,4 +1187,3 @@ config_parse_interval(const char *s, int *ok)
   }
   return (int)r;
 }
-
diff --git a/src/or/consdiff.c b/src/or/consdiff.c
index 59e27c0ae..6d000997f 100644
--- a/src/or/consdiff.c
+++ b/src/or/consdiff.c
@@ -1412,4 +1412,3 @@ looks_like_a_consensus_diff(const char *document, size_t 
len)
   return (len >= strlen(ns_diff_version) &&
   fast_memeq(document, ns_diff_version, strlen(ns_diff_version)));
 }
-
diff --git a/src/or/consdiff.h b/src/or/consdiff.h
index 3f73b8536..1cae59a1a 100644
--- a/src/or/consdiff.h
+++ b/src/or/consdiff.h
@@ -15,6 +15,8 @@ char *consensus_diff_apply(const char *consensus,
 int looks_like_a_consensus_diff(const char *document, size_t len);
 
 #ifdef CONSDIFF_PRIVATE
+#include "lib/container/bitarray.h"
+
 struct memarea_t;
 
 /** Line type used for constructing consensus diffs.  Each of these lines
@@ -95,4 +97,3 @@ MOCK_DECL(STATIC int,
 #endif /* defined(CONSDIFF_PRIVATE) */
 
 #endif /* !defined(TOR_CONSDIFF_H) */
-
diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c
index 16439905a..85a0d3e70 100644
--- a/src/or/dirauth/dirvote.c
+++ 

[tor-commits] [tor/master] Simplify include structure of container.[ch]

2018-06-26 Thread nickm
commit f95e3bf5fc4e2d5fef42b86d81f155c00b1983ac
Author: Nick Mathewson 
Date:   Thu Jun 21 15:33:25 2018 -0400

Simplify include structure of container.[ch]
---
 src/common/address.h   |  2 +-
 src/common/container.c | 13 +++--
 src/common/container.h | 12 ++--
 src/common/util.c  | 11 ---
 src/common/util.h  |  1 -
 src/common/util_bug.c  |  1 -
 6 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/src/common/address.h b/src/common/address.h
index 317c7f329..6986143f6 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -16,6 +16,7 @@
 #include "lib/cc/torint.h"
 #include "common/compat.h"
 #include "common/container.h"
+#include "common/util_bug.h"
 
 #ifdef ADDRESS_PRIVATE
 
@@ -376,4 +377,3 @@ STATIC smartlist_t *get_interface_addresses_ioctl(int 
severity,
 #endif /* defined(ADDRESS_PRIVATE) */
 
 #endif /* !defined(TOR_ADDRESS_H) */
-
diff --git a/src/common/container.c b/src/common/container.c
index c30e84ba2..a7810ba90 100644
--- a/src/common/container.c
+++ b/src/common/container.c
@@ -11,9 +11,7 @@
  * a digest-to-void* map.
  **/
 
-#include "common/compat.h"
 #include "common/util.h"
-#include "common/torlog.h"
 #include "common/container.h"
 #include "lib/crypt_ops/crypto_digest.h"
 
@@ -113,6 +111,17 @@ smartlist_add_all(smartlist_t *s1, const smartlist_t *s2)
   s1->num_used = (int) new_size;
 }
 
+/** Append a copy of string to sl */
+void
+smartlist_add_strdup(struct smartlist_t *sl, const char *string)
+{
+  char *copy;
+
+  copy = tor_strdup(string);
+
+  smartlist_add(sl, copy);
+}
+
 /** Remove all elements E from sl such that E==element.  Preserve
  * the order of any elements before E, but elements after E can be
  * rearranged.
diff --git a/src/common/container.h b/src/common/container.h
index 372fa6640..c45bfc359 100644
--- a/src/common/container.h
+++ b/src/common/container.h
@@ -6,7 +6,15 @@
 #ifndef TOR_CONTAINER_H
 #define TOR_CONTAINER_H
 
-#include "common/util.h"
+#include 
+#include 
+#include 
+
+#include "lib/cc/compat_compiler.h"
+#include "lib/cc/torint.h"
+#include "lib/testsupport/testsupport.h"
+#include "lib/malloc/util_malloc.h"
+#include "common/util_bug.h"
 #include "siphash.h"
 
 /** A resizeable list of pointers, with associated helpful functionality.
@@ -34,6 +42,7 @@ MOCK_DECL(void, smartlist_free_, (smartlist_t *sl));
 void smartlist_clear(smartlist_t *sl);
 void smartlist_add(smartlist_t *sl, void *element);
 void smartlist_add_all(smartlist_t *sl, const smartlist_t *s2);
+void smartlist_add_strdup(struct smartlist_t *sl, const char *string);
 void smartlist_remove(smartlist_t *sl, const void *element);
 void smartlist_remove_keeporder(smartlist_t *sl, const void *element);
 void *smartlist_pop_last(smartlist_t *sl);
@@ -739,4 +748,3 @@ third_quartile_uint32(uint32_t *array, int n_elements)
 }
 
 #endif /* !defined(TOR_CONTAINER_H) */
-
diff --git a/src/common/util.c b/src/common/util.c
index d09d19415..fbb2fed39 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -3279,17 +3279,6 @@ smartlist_add_vasprintf(struct smartlist_t *sl, const 
char *pattern,
   smartlist_add(sl, str);
 }
 
-/** Append a copy of string to sl */
-void
-smartlist_add_strdup(struct smartlist_t *sl, const char *string)
-{
-  char *copy;
-
-  copy = tor_strdup(string);
-
-  smartlist_add(sl, copy);
-}
-
 /** Return a new list containing the filenames in the directory dirname.
  * Return NULL on error or if dirname is not a directory.
  */
diff --git a/src/common/util.h b/src/common/util.h
index bc29ddbe2..1c889082b 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -167,7 +167,6 @@ void smartlist_add_asprintf(struct smartlist_t *sl, const 
char *pattern, ...)
 void smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern,
  va_list args)
   CHECK_PRINTF(2, 0);
-void smartlist_add_strdup(struct smartlist_t *sl, const char *string);
 
 /* Time helpers */
 long tv_udiff(const struct timeval *start, const struct timeval *end);
diff --git a/src/common/util_bug.c b/src/common/util_bug.c
index 5cfd00649..524d48c68 100644
--- a/src/common/util_bug.c
+++ b/src/common/util_bug.c
@@ -116,4 +116,3 @@ tor_bug_occurred_(const char *fname, unsigned int line,
   }
 #endif
 }
-



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Extract tor_malloc and friends to a new module.

2018-06-26 Thread nickm
commit e066966bf48b4f6ca557175cb2ab3e2dffa5b1db
Author: Nick Mathewson 
Date:   Thu Jun 21 15:17:54 2018 -0400

Extract tor_malloc and friends to a new module.
---
 .gitignore   |   2 +
 Makefile.am  |   2 +
 src/common/util.c| 210 ---
 src/common/util.h|  71 +
 src/include.am   |   1 +
 src/lib/malloc/.may_include  |   6 ++
 src/lib/malloc/include.am|  17 
 src/lib/malloc/util_malloc.c | 231 +++
 src/lib/malloc/util_malloc.h |  90 +
 src/rust/build.rs|   1 +
 src/test/test_util.c |   2 +-
 11 files changed, 352 insertions(+), 281 deletions(-)

diff --git a/.gitignore b/.gitignore
index 07fa3afac..c5da8e423 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,6 +171,8 @@ uptime-*.json
 /src/lib/libtor-ctime-testing.a
 /src/lib/libtor-err.a
 /src/lib/libtor-err-testing.a
+/src/lib/libtor-malloc.a
+/src/lib/libtor-malloc-testing.a
 /src/lib/libtor-tls.a
 /src/lib/libtor-tls-testing.a
 /src/lib/libtor-trace.a
diff --git a/Makefile.am b/Makefile.am
index 38e79eb7c..960417df9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,7 @@ endif
 # "Common" libraries used to link tor's utility code.
 TOR_UTIL_LIBS = \
src/common/libor.a \
+   src/lib/libtor-malloc.a \
 src/lib/libtor-err.a \
src/lib/libtor-ctime.a
 
@@ -47,6 +48,7 @@ TOR_UTIL_LIBS = \
 # and tests)
 TOR_UTIL_TESTING_LIBS = \
src/common/libor-testing.a \
+   src/lib/libtor-malloc-testing.a \
 src/lib/libtor-err-testing.a \
 src/lib/libtor-ctime-testing.a
 
diff --git a/src/common/util.c b/src/common/util.c
index fd1bb815d..d09d19415 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -95,219 +95,10 @@
 #include 
 #endif
 
-#ifdef __clang_analyzer__
-#undef MALLOC_ZERO_WORKS
-#endif
-
 /* =
  * Memory management
  * = */
 
-/** Allocate a chunk of size bytes of memory, and return a pointer to
- * result.  On error, log and terminate the process.  (Same as malloc(size),
- * but never returns NULL.)
- */
-void *
-tor_malloc_(size_t size)
-{
-  void *result;
-
-  raw_assert(size < SIZE_T_CEILING);
-
-#ifndef MALLOC_ZERO_WORKS
-  /* Some libc mallocs don't work when size==0. Override them. */
-  if (size==0) {
-size=1;
-  }
-#endif /* !defined(MALLOC_ZERO_WORKS) */
-
-  result = raw_malloc(size);
-
-  if (PREDICT_UNLIKELY(result == NULL)) {
-/* LCOV_EXCL_START */
-/* If these functions die within a worker process, they won't call
- * spawn_exit, but that's ok, since the parent will run out of memory soon
- * anyway. */
-raw_assert_unreached_msg("Out of memory on malloc(). Dying.");
-/* LCOV_EXCL_STOP */
-  }
-  return result;
-}
-
-/** Allocate a chunk of size bytes of memory, fill the memory with
- * zero bytes, and return a pointer to the result.  Log and terminate
- * the process on error.  (Same as calloc(size,1), but never returns NULL.)
- */
-void *
-tor_malloc_zero_(size_t size)
-{
-  /* You may ask yourself, "wouldn't it be smart to use calloc instead of
-   * malloc+memset?  Perhaps libc's calloc knows some nifty optimization trick
-   * we don't!"  Indeed it does, but its optimizations are only a big win when
-   * we're allocating something very big (it knows if it just got the memory
-   * from the OS in a pre-zeroed state).  We don't want to use tor_malloc_zero
-   * for big stuff, so we don't bother with calloc. */
-  void *result = tor_malloc_(size);
-  memset(result, 0, size);
-  return result;
-}
-
-/* The square root of SIZE_MAX + 1.  If a is less than this, and b is less
- * than this, then a*b is less than SIZE_MAX.  (For example, if size_t is
- * 32 bits, then SIZE_MAX is 0x and this value is 0x1.  If a and
- * b are less than this, then their product is at most (65535*65535) ==
- * 0xfffe0001. */
-#define SQRT_SIZE_MAX_P1 (((size_t)1) << (sizeof(size_t)*4))
-
-/** Return non-zero if and only if the product of the arguments is exact,
- * and cannot overflow. */
-int
-size_mul_check(const size_t x, const size_t y)
-{
-  /* This first check is equivalent to
- (x < SQRT_SIZE_MAX_P1 && y < SQRT_SIZE_MAX_P1)
-
- Rationale: if either one of x or y is >= SQRT_SIZE_MAX_P1, then it
- will have some bit set in its most significant half.
-   */
-  return ((x|y) < SQRT_SIZE_MAX_P1 ||
-  y == 0 ||
-  x <= SIZE_MAX / y);
-}
-
-/** Allocate a chunk of nmemb*size bytes of memory, fill
- * the memory with zero bytes, and return a pointer to the result.
- * Log and terminate the process on error.  (Same as
- * calloc(nmemb,size), but never returns NULL.)
- * The second argument (size) should preferably be non-zero
- * and a compile-time constant.
- */
-void *
-tor_calloc_(size_t nmemb, size_t size)
-{
-  raw_assert(size_mul_check(nmemb, size));
-  return tor_malloc_zero_((nmemb * size));
-}
-
-/** Change the size of 

[tor-commits] [tor/release-0.3.4] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Merge branch 'maint-0.2.9' into release-0.2.9

2018-06-26 Thread nickm
commit e7b146736f7014abb6dbce3e596ee5b94a1d5916
Merge: 2ef4bccb4 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into release-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-06-26 Thread nickm
commit 25226fb260a6b5f93187b707ec35f06637fbe710
Merge: 6107a2127 d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Merge branch 'maint-0.3.4' into release-0.3.4

2018-06-26 Thread nickm
commit 37119ef9d87037d15122b59131e951d4c98e5089
Merge: 3015d3d7c c08102ea7
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.4' into release-0.3.4

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.1' into release-0.3.1

2018-06-26 Thread nickm
commit 4671b05736c1c09d6d6f126f47875d18f5a06156
Merge: ac46e04fe d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into release-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-06-26 Thread nickm
commit 25226fb260a6b5f93187b707ec35f06637fbe710
Merge: 6107a2127 d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.3' into release-0.3.3

2018-06-26 Thread nickm
commit 63cddead384d067604f44091e2a8a3f776ccd2bf
Merge: 6c38795b7 f8dad5a07
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.3' into release-0.3.3

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-06-26 Thread nickm
commit f8dad5a079ac356ef72f14cfddca2d81fd824102
Merge: 8b108935b 25226fb26
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Merge branch 'maint-0.3.3' into maint-0.3.4

2018-06-26 Thread nickm
commit c08102ea777ddaaa8404021a1c8b84082f5eff8b
Merge: cf0597c3b f8dad5a07
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.3' into maint-0.3.4

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-06-26 Thread nickm
commit f8dad5a079ac356ef72f14cfddca2d81fd824102
Merge: 8b108935b 25226fb26
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-06-26 Thread nickm
commit f8dad5a079ac356ef72f14cfddca2d81fd824102
Merge: 8b108935b 25226fb26
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-06-26 Thread nickm
commit 25226fb260a6b5f93187b707ec35f06637fbe710
Merge: 6107a2127 d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.4'

2018-06-26 Thread nickm
commit b4e23dba930cbb8168151e1fe9dcf280615d6f3b
Merge: 06f3526b0 c08102ea7
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.4'

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-06-26 Thread nickm
commit 25226fb260a6b5f93187b707ec35f06637fbe710
Merge: 6107a2127 d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.4] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.3.2' into release-0.3.2

2018-06-26 Thread nickm
commit aec52266185782f73725a4df8eabb98d6902584f
Merge: f5b9e43d0 25226fb26
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.2' into release-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.3' into maint-0.3.4

2018-06-26 Thread nickm
commit c08102ea777ddaaa8404021a1c8b84082f5eff8b
Merge: cf0597c3b f8dad5a07
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.3' into maint-0.3.4

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.4] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-06-26 Thread nickm
commit f8dad5a079ac356ef72f14cfddca2d81fd824102
Merge: 8b108935b 25226fb26
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.4] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.4] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-06-26 Thread nickm
commit 25226fb260a6b5f93187b707ec35f06637fbe710
Merge: 6107a2127 d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-06-26 Thread nickm
commit 25226fb260a6b5f93187b707ec35f06637fbe710
Merge: 6107a2127 d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.4] Merge branch 'maint-0.3.3' into maint-0.3.4

2018-06-26 Thread nickm
commit c08102ea777ddaaa8404021a1c8b84082f5eff8b
Merge: cf0597c3b f8dad5a07
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.3' into maint-0.3.4

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.4] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-06-26 Thread nickm
commit 25226fb260a6b5f93187b707ec35f06637fbe710
Merge: 6107a2127 d6d3f8486
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-06-26 Thread nickm
commit f8dad5a079ac356ef72f14cfddca2d81fd824102
Merge: 8b108935b 25226fb26
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.9] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-06-26 Thread nickm
commit d6d3f8486dbac9837a793f431dcd58505e7274e4
Merge: 340fcc7e2 fcd26af7c
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:59 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Prefer recent Python 3 in autoconf.

2018-06-26 Thread nickm
commit 47ee7978fe73816bf15cb392d0e89301f65724f8
Author: Nick Mathewson 
Date:   Thu Jun 21 09:28:50 2018 -0400

Prefer recent Python 3 in autoconf.

Closes ticket 26372.
---
 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/feature26372_029 b/changes/feature26372_029
new file mode 100644
index 0..150ac3055
--- /dev/null
+++ b/changes/feature26372_029
@@ -0,0 +1,4 @@
+  o Minor features (compilation):
+
+- When building Tor, prefer to use Python 3 over Python 2, and more
+  recent (contemplated) versions over older ones. Closes ticket 26372.
diff --git a/configure.ac b/configure.ac
index 15ecbe60e..279660d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,11 @@ AM_PROG_CC_C_O
 AC_PROG_CC_C99
 
 AC_ARG_VAR([PYTHON], [path to Python binary])
-AC_CHECK_PROGS(PYTHON, [python python2 python2.7 python3 python3.3])
+AC_CHECK_PROGS(PYTHON, [ \
+   python3 \
+   python3.8 python3.7 python3.6 python3.5 python3.4 \
+   python \
+   python2 python2.7])
 if test "x$PYTHON" = "x"; then
   AC_MSG_WARN([Python unavailable; some tests will not be run.])
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.9] Merge branch 'feature26372_029' into maint-0.2.9

2018-06-26 Thread nickm
commit fcd26af7c0b9926f8e56149a72de9dd47ad37a69
Merge: dd69e74e3 47ee7978f
Author: Nick Mathewson 
Date:   Tue Jun 26 09:21:55 2018 -0400

Merge branch 'feature26372_029' into maint-0.2.9

 changes/feature26372_029 | 4 
 configure.ac | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/master] Bug 26380: Remove tor browser sandbox from the download page

2018-06-26 Thread boklm
commit dd6d2ed159b353260cbb087ee5d5f857a94ad603
Author: Nicolas Vigier 
Date:   Tue Jun 26 14:53:12 2018 +0200

Bug 26380: Remove tor browser sandbox from the download page
---
 include/versions.wmi   |  1 -
 projects/en/torbrowser.wml | 25 -
 2 files changed, 26 deletions(-)

diff --git a/include/versions.wmi b/include/versions.wmi
index 76dc17ec..2884c4ab 100644
--- a/include/versions.wmi
+++ b/include/versions.wmi
@@ -24,7 +24,6 @@
 # *** tor browser beta/alpha ***
 8.0a8
 2018-06-10
-0.0.16
 
 # If all platforms are on the same version, you only need to update
 # version-torbrowserbundlebeta-all and releasedate-torbrowserbundlebeta-all
diff --git a/projects/en/torbrowser.wml b/projects/en/torbrowser.wml
index 9d196bd3..761feac6 100644
--- a/projects/en/torbrowser.wml
+++ b/projects/en/torbrowser.wml
@@ -618,31 +618,6 @@
 
   
   
-
-
-
-Tor Browser Sandbox
- 
-  
-
-  
-
-  Language
-  Linux()
-
-  
-  
-
-  All
-  64-bit
-  (sig)
-  
-
-  
-
-  
-  
-
 
   
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/master] Merge branch 'staging'

2018-06-26 Thread boklm
commit b0fac878027b3973b74efe4c1df50b8f0089e753
Merge: eaf380a9 dd6d2ed1
Author: Nicolas Vigier 
Date:   Tue Jun 26 15:14:16 2018 +0200

Merge branch 'staging'

 include/versions.wmi   |  1 -
 projects/en/torbrowser.wml | 25 -
 2 files changed, 26 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Bump version to 0.3.4.3-alpha-dev

2018-06-26 Thread nickm
commit cf0597c3b2eb3baea34205a401acd28b307fc900
Author: Nick Mathewson 
Date:   Tue Jun 26 09:12:23 2018 -0400

Bump version to 0.3.4.3-alpha-dev
---
 configure.ac| 2 +-
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 47d80a897..afc488333 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2017, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.3.4.3-alpha])
+AC_INIT([tor],[0.3.4.3-alpha-dev])
 AC_CONFIG_SRCDIR([src/or/main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index 23fe39ab7..32f1f23e7 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.3.4.3-alpha"
+!define VERSION "0.3.4.3-alpha-dev"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index c6de2b33f..757ea2945 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.3.4.3-alpha"
+#define VERSION "0.3.4.3-alpha-dev"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Bump version to 0.3.4.3-alpha-dev

2018-06-26 Thread nickm
commit cf0597c3b2eb3baea34205a401acd28b307fc900
Author: Nick Mathewson 
Date:   Tue Jun 26 09:12:23 2018 -0400

Bump version to 0.3.4.3-alpha-dev
---
 configure.ac| 2 +-
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 47d80a897..afc488333 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2017, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.3.4.3-alpha])
+AC_INIT([tor],[0.3.4.3-alpha-dev])
 AC_CONFIG_SRCDIR([src/or/main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index 23fe39ab7..32f1f23e7 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.3.4.3-alpha"
+!define VERSION "0.3.4.3-alpha-dev"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index c6de2b33f..757ea2945 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.3.4.3-alpha"
+#define VERSION "0.3.4.3-alpha-dev"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Merge branch 'maint-0.3.4' into release-0.3.4

2018-06-26 Thread nickm
commit 3015d3d7c4f0b6fd5e7b9c8271b03e80791beade
Merge: e8c256ca8 cf0597c3b
Author: Nick Mathewson 
Date:   Tue Jun 26 09:12:39 2018 -0400

Merge branch 'maint-0.3.4' into release-0.3.4

 configure.ac| 2 +-
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.4] Bump version to 0.3.4.3-alpha-dev

2018-06-26 Thread nickm
commit cf0597c3b2eb3baea34205a401acd28b307fc900
Author: Nick Mathewson 
Date:   Tue Jun 26 09:12:23 2018 -0400

Bump version to 0.3.4.3-alpha-dev
---
 configure.ac| 2 +-
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 47d80a897..afc488333 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2017, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.3.4.3-alpha])
+AC_INIT([tor],[0.3.4.3-alpha-dev])
 AC_CONFIG_SRCDIR([src/or/main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index 23fe39ab7..32f1f23e7 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.3.4.3-alpha"
+!define VERSION "0.3.4.3-alpha-dev"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index c6de2b33f..757ea2945 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.3.4.3-alpha"
+#define VERSION "0.3.4.3-alpha-dev"
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.4'

2018-06-26 Thread nickm
commit 06f3526b03a7a9462f26515ae7c2dde2b283a3fb
Merge: ed2dbd51e cf0597c3b
Author: Nick Mathewson 
Date:   Tue Jun 26 09:12:28 2018 -0400

Merge branch 'maint-0.3.4'

"ours" to avoid version bump.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Bug 26380: Remove tor browser sandbox from the download page

2018-06-26 Thread boklm
commit dd6d2ed159b353260cbb087ee5d5f857a94ad603
Author: Nicolas Vigier 
Date:   Tue Jun 26 14:53:12 2018 +0200

Bug 26380: Remove tor browser sandbox from the download page
---
 include/versions.wmi   |  1 -
 projects/en/torbrowser.wml | 25 -
 2 files changed, 26 deletions(-)

diff --git a/include/versions.wmi b/include/versions.wmi
index 76dc17ec..2884c4ab 100644
--- a/include/versions.wmi
+++ b/include/versions.wmi
@@ -24,7 +24,6 @@
 # *** tor browser beta/alpha ***
 8.0a8
 2018-06-10
-0.0.16
 
 # If all platforms are on the same version, you only need to update
 # version-torbrowserbundlebeta-all and releasedate-torbrowserbundlebeta-all
diff --git a/projects/en/torbrowser.wml b/projects/en/torbrowser.wml
index 9d196bd3..761feac6 100644
--- a/projects/en/torbrowser.wml
+++ b/projects/en/torbrowser.wml
@@ -618,31 +618,6 @@
 
   
   
-
-
-
-Tor Browser Sandbox
- 
-  
-
-  
-
-  Language
-  Linux()
-
-  
-  
-
-  All
-  64-bit
-  (sig)
-  
-
-  
-
-  
-  
-
 
   
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/master] Tor alpha release: 0.3.4.3-alpha

2018-06-26 Thread nickm
commit eaf380a9f73b92ca61147f78823f6daa4a1d5061
Author: Nick Mathewson 
Date:   Tue Jun 26 08:53:45 2018 -0400

Tor alpha release: 0.3.4.3-alpha
---
 Makefile | 2 +-
 include/versions.wmi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 41ae56a0..3eaf7c62 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@
 # website component, and set it to needs_review.
 
 export STABLETAG=tor-0.3.3.6
-export DEVTAG=tor-0.3.4.1-alpha
+export DEVTAG=tor-0.3.4.3-alpha
 
 WMLBASE=.
 SUBDIRS=docs eff projects press about download getinvolved donate 
docs/torbutton
diff --git a/include/versions.wmi b/include/versions.wmi
index 76dc17ec..ec4506d2 100644
--- a/include/versions.wmi
+++ b/include/versions.wmi
@@ -1,5 +1,5 @@
 0.3.3.7
-0.3.4.2-alpha
+0.3.4.3-alpha
 
 maint-7.5
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Forward-port the 0.3.4.3-alpha ChangeLog

2018-06-26 Thread nickm
commit ed2dbd51ef4762cff0bbb29f86664b217ca218b9
Author: Nick Mathewson 
Date:   Tue Jun 26 08:49:06 2018 -0400

Forward-port the 0.3.4.3-alpha ChangeLog
---
 ChangeLog | 70 ++-
 1 file changed, 69 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 60583ac7f..5d2c6e6ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,72 @@
+Changes in version 0.3.4.3-alpha - 2018-06-26
+  Tor 0.3.4.3-alpha fixes several bugs in earlier versions, including
+  one that was causing stability issues on directory authorities.
+
+  o Major bugfixes (directory authority):
+- Stop leaking memory on directory authorities when planning to
+  vote. This bug was crashing authorities by exhausting their
+  memory. Fixes bug 26435; bugfix on 0.3.3.6.
+
+  o Major bugfixes (rust, testing):
+- Make sure that failing tests in Rust will actually cause the build
+  to fail: previously, they were ignored. Fixes bug 26258; bugfix
+  on 0.3.3.4-alpha.
+
+  o Minor feature (directory authorities):
+- Stop warning about incomplete bw lines before the first complete
+  bw line has been found, so that additional header lines can be
+  ignored. Fixes bug 25960; bugfix on 0.2.2.1-alpha
+
+  o Minor features (relay, diagnostic):
+- Add several checks to detect whether Tor relays are uploading
+  their descriptors without specifying why they regenerated them.
+  Diagnostic for ticket 25686.
+
+  o Minor features (unit tests):
+- Test complete bandwidth measurements files, and test that
+  incomplete bandwidth lines only give warnings when the end of the
+  header has not been detected. Fixes bug 25947; bugfix
+  on 0.2.2.1-alpha
+
+  o Minor bugfixes (compilation):
+- Refrain from compiling unit testing related object files when
+  --disable-unittests is set to configure script. Fixes bug 24891;
+  bugfix on 0.2.5.1-alpha.
+- When linking the libtor_testing.a library, only include the
+  dirauth object files once. Previously, they were getting added
+  twice. Fixes bug 26402; bugfix on 0.3.4.1-alpha.
+- The --enable-fatal-warnings flag now affects Rust code as well.
+  Closes ticket 26245.
+
+  o Minor bugfixes (onion services):
+- Recompute some consensus information after detecting a clock jump,
+  or after transitioning from a non-live consensus to a live
+  consensus. We do this to avoid having an outdated state, and
+  miscalculating the index for next-generation onion services. Fixes
+  bug 24977; bugfix on 0.3.2.1-alpha.
+
+  o Minor bugfixes (relay):
+- Relays now correctly block attempts to re-extend to the previous
+  relay by Ed25519 identity. Previously they would warn in this
+  case, but not actually reject the attempt. Fixes bug 26158; bugfix
+  on 0.3.0.1-alpha.
+
+  o Minor bugfixes (testing):
+- Fix compilation of the doctests in the Rust crypto crate. Fixes
+  bug 26415; bugfix on 0.3.4.1-alpha.
+- Instead of trying to read the geoip configuration files from
+  within the unit tests, instead create our own ersatz files with
+  just enough geoip data in the format we expect. Trying to read
+  from the source directory created problems on Windows with mingw,
+  where the build system's paths are not the same as the platform's
+  paths. Fixes bug 25787; bugfix on 0.3.4.1-alpha.
+- Refrain from trying to get an item from an empty smartlist in
+  test_bridges_clear_bridge_list. Set DEBUG_SMARTLIST in unit tests
+  to catch improper smartlist usage. Furthermore, enable
+  DEBUG_SMARTLIST globally when build is configured with fragile
+  hardening. Fixes bug 26196; bugfix on 0.3.4.1-alpha.
+
+
 Changes in version 0.3.3.7 - 2018-06-12
   Tor 0.3.3.7 backports several changes from the 0.3.4.x series, including
   fixes for bugs affecting compatibility and stability.
@@ -28476,4 +28545,3 @@ Changes in version 0.0.2pre13 - 2003-10-19
 - If --DebugLogFile is specified, log to it at -l debug
 - If --LogFile is specified, use it instead of commandline
 - If --RunAsDaemon is set, tor forks and backgrounds on startup
-

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-properties] Update translations for tor-launcher-properties

2018-06-26 Thread translation
commit d26df0f89df5fa996df1c1711dfbf6cedd929f1f
Author: Translation commit bot 
Date:   Tue Jun 26 12:46:16 2018 +

Update translations for tor-launcher-properties
---
 de/torlauncher.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/de/torlauncher.properties b/de/torlauncher.properties
index 21fbbcfe5..49aabaaec 100644
--- a/de/torlauncher.properties
+++ b/de/torlauncher.properties
@@ -39,7 +39,7 @@ torlauncher.captcha_prompt=Löse das CAPTCHA um eine Brücke 
anzufordern.
 torlauncher.bad_captcha_solution=Die Lösung ist nicht korrekt. Bitte 
versuchen Sie es erneut.
 torlauncher.unable_to_get_bridge=Nicht imstande eine Brücke von der BridgeDB 
zu erhalten.\n\n%S
 torlauncher.no_meek=Der Browser ist nicht für meek eingestellt, was gebraucht 
wird um Brücken zu bekommen.
-torlauncher.no_bridges_available=No bridges are available at this time. Sorry.
+torlauncher.no_bridges_available=Zur Zeit sind keine Brücken verfügbar. Es 
tut uns Leid.
 
 torlauncher.connect=Verbinden
 torlauncher.restart_tor=Tor neustarten
@@ -73,6 +73,6 @@ torlauncher.bootstrapWarning.noroute=Kein Pfad zum Rechner
 torlauncher.bootstrapWarning.ioerror=Lese-/Schreibfehler
 torlauncher.bootstrapWarning.pt_missing=Steckbarer Transport fehlt
 
-torlauncher.nsresult.NS_ERROR_NET_RESET=The connection to the server was lost.
+torlauncher.nsresult.NS_ERROR_NET_RESET=Die Verbindung zum Server ist verloren 
gegangen.
 torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Konnte nicht mit dem Server 
verbinden.
 torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Konnte nicht mit dem 
Proxy verbinden.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-properties_completed] Update translations for tor-launcher-properties_completed

2018-06-26 Thread translation
commit ff2d5dc3afd72f4c91004ba5c43c4643baf4853c
Author: Translation commit bot 
Date:   Tue Jun 26 12:46:21 2018 +

Update translations for tor-launcher-properties_completed
---
 de/torlauncher.properties | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/de/torlauncher.properties b/de/torlauncher.properties
index 9b863d5bd..49aabaaec 100644
--- a/de/torlauncher.properties
+++ b/de/torlauncher.properties
@@ -26,11 +26,21 @@ torlauncher.error_proxy_addr_missing=Damit Tor einen 
Vermittlungsserver benutzt,
 torlauncher.error_proxy_type_missing=Sie müssen eine Vermittlungstyp 
auswählen.
 torlauncher.error_bridges_missing=Sie müssen eine oder mehrere Brücken 
eingeben.
 torlauncher.error_default_bridges_type_missing=Sie müssen eine Transporttyp 
für die bereitgestellten Brücken auswählen.
+torlauncher.error_bridgedb_bridges_missing=Bitte eine Brücke anfordern.
 torlauncher.error_bridge_bad_default_type=Es sind keine bereitgestellten 
Brücken verfügbar, die den Transporttyp %S haben. Bitte passen Sie Ihre 
Einstellungen an.
 
 torlauncher.bridge_suffix.meek-amazon=(funktioniert in China)
 torlauncher.bridge_suffix.meek-azure=(funktioniert in China)
 
+torlauncher.request_a_bridge=Brücke anfordern
+torlauncher.request_a_new_bridge=Neue Brücke anfordern...
+torlauncher.contacting_bridgedb=Kontaktiere BridgeDB. Bitte warten.
+torlauncher.captcha_prompt=Löse das CAPTCHA um eine Brücke anzufordern.
+torlauncher.bad_captcha_solution=Die Lösung ist nicht korrekt. Bitte 
versuchen Sie es erneut.
+torlauncher.unable_to_get_bridge=Nicht imstande eine Brücke von der BridgeDB 
zu erhalten.\n\n%S
+torlauncher.no_meek=Der Browser ist nicht für meek eingestellt, was gebraucht 
wird um Brücken zu bekommen.
+torlauncher.no_bridges_available=Zur Zeit sind keine Brücken verfügbar. Es 
tut uns Leid.
+
 torlauncher.connect=Verbinden
 torlauncher.restart_tor=Tor neustarten
 torlauncher.quit=Schließen
@@ -62,3 +72,7 @@ 
torlauncher.bootstrapWarning.timeout=Verbindungszeitüberschreitung
 torlauncher.bootstrapWarning.noroute=Kein Pfad zum Rechner
 torlauncher.bootstrapWarning.ioerror=Lese-/Schreibfehler
 torlauncher.bootstrapWarning.pt_missing=Steckbarer Transport fehlt
+
+torlauncher.nsresult.NS_ERROR_NET_RESET=Die Verbindung zum Server ist verloren 
gegangen.
+torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Konnte nicht mit dem Server 
verbinden.
+torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Konnte nicht mit dem 
Proxy verbinden.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.4] Set the release date.

2018-06-26 Thread nickm
commit e8c256ca803b09879f52a641d8143543c22ac763
Author: Nick Mathewson 
Date:   Tue Jun 26 08:44:04 2018 -0400

Set the release date.
---
 ChangeLog | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c0fddc4eb..5d2c6e6ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Changes in version 0.3.4.3-alpha - 2018-06-2?
+Changes in version 0.3.4.3-alpha - 2018-06-26
   Tor 0.3.4.3-alpha fixes several bugs in earlier versions, including
   one that was causing stability issues on directory authorities.
 
@@ -28545,4 +28545,3 @@ Changes in version 0.0.2pre13 - 2003-10-19
 - If --DebugLogFile is specified, log to it at -l debug
 - If --LogFile is specified, use it instead of commandline
 - If --RunAsDaemon is set, tor forks and backgrounds on startup
-

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Adjust teor' people page entry

2018-06-26 Thread boklm
commit 8abebffcde8d23a435b69e0aaf6de77ecc36c73f
Author: Damian Johnson 
Date:   Thu Jun 21 11:03:19 2018 -0700

Adjust teor' people page entry

Dropping their name and adjusting the description per their request.
---
 about/en/corepeople.wml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/about/en/corepeople.wml b/about/en/corepeople.wml
index 61b9e34c..1fa7ac9e 100644
--- a/about/en/corepeople.wml
+++ b/about/en/corepeople.wml
@@ -828,9 +828,9 @@
   
   
   https://db.torproject.org/fetchkey.cgi?fingerprint=C8556CED5D90A0C529F64D43450CBA7F968F094B;>
-  Tim Wilson-Brown
+  teor
   IRC: teor
-  Onion services developer, and core member of 
Tor dev team. Researches Tor network measurement and onion service 
scalability.
+  Tor developer and chutney maintainer. Currently 
working on onion services, directory documents, and statistics.
 
   
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Add pm jobs posts

2018-06-26 Thread boklm
commit 49eec96a54e91ba3bfbd13523ee572efc158d3b3
Author: hiro 
Date:   Mon Jun 18 09:28:12 2018 +0200

Add pm jobs posts
---
 about/en/jobs-projectmanager-network.wml | 64 +++
 about/en/jobs-projectmanager-product.wml | 66 
 about/en/jobs.wml|  2 +
 3 files changed, 132 insertions(+)

diff --git a/about/en/jobs-projectmanager-network.wml 
b/about/en/jobs-projectmanager-network.wml
new file mode 100644
index ..eaf6fc08
--- /dev/null
+++ b/about/en/jobs-projectmanager-network.wml
@@ -0,0 +1,64 @@
+#include "head.wmi" TITLE="Tor Project: Jobs (project manager network)" 
CHARSET="UTF-8"
+
+  
+Home  
+About  
+Jobs
+  
+  
+Internet Freedom Nonprofit Seeks Experienced Project Manager for 
Network Projects
+(Posted June 18, 2018)
+
+The Tor Project, Inc., a 501(c)(3) nonprofit organization advancing 
human rights and freedoms by creating and deploying free and open source 
anonymity and privacy technologies, is seeking a Project Manager to help 
coordinate the projects of our Network, Metrics, and Anti-Censorship teams, as 
well as our network interference observatory team known as OONI.
+
+The ideal candidate has experience leading an open source project. Tor 
is developed and maintained collaboratively through the contributions of a 
diverse, global community. We work hard to choose communications tools that 
encourage participation, where every contributor is heard and respected. The 
person in this job must be a team player with excellent communication 
skills.
+
+Our Network Projects PM understands that inter-team collaboration makes 
each team stronger, and will focus on helping teams work together effectively. 
This person will be responsible for ensuring a productive, healthy work 
environment so all team members are able to contribute effectively and to the 
best of their abilities. All teams are distributed globally across multiple 
time zones, so the ability to organize and communicate via chats, email, etc., 
is crucial. This person will also be the link between the teams, volunteers, 
and sponsors (funders), and thus must have strong organizational skills and the 
ability to communicate in writing to diverse audiences.
+
+You will be helping the teams roadmap, identify projects for grant 
proposals, manage project execution, and write progress reports to our 
sponsors. You are an experienced professional who is capable of building 
processes and best practices for the teams, regardless of the tools being 
used.
+
+This position will work closely with other team leads and project 
managers. This position reports directly to the Executive Director.
+
+Responsibilities:
+
+   Provide advice to teams where needed and point them in the right 
direction; help them understand what is expected of them
+   Coordinate the transfer of information to and between the teams, 
sponsors, and greater Tor community
+   Organize team meetings, help your teams plan their roadmaps, and 
show the teams how to improve their processes
+   Work with the Tor Project’s Fundraising Director and Grant Writer 
on grant proposals by providing them with your teams’ ideas for projects and 
the personnel needed for execution
+   Manage risks and issues that might occur while executing a 
project
+   Manage execution of roadmap and monitor the progress of your 
teams’ projects
+
+
+Qualifications:
+
+  Solid knowledge of internet technologies and security tools
+  Super organized
+  Know-how to build great processes no matter what tools teams are 
using
+  Great facilitator
+  Excellent written and verbal communication skills
+  Experience managing people
+  Knowledge of and experience with software development life-cycle 
process
+  Experience with Free and Open Source Software culture
+  Comfortable with transparency
+  Excellent attention to detail
+  Prior experience working on U.S. government grants and contracts a 
plus!
+  Willingness to travel to internationally at least twice a year
+
+
+The Tor Project's workforce is smart and committed. Experience working 
with open source communities and/or a dedication to Internet freedom are added 
pluses. The Tor Project currently has a paid and contract staff of around 35 
developers and operational support staff, plus many thousands of volunteers who 
contribute to our work. The ideal candidate will be energetic, unflappable and 
flexible, and will thrive in a highly-technical collaborative environment.
+
+This is a full-time, hands-on position, which can be done remotely or 
in our office in Seattle, WA. Flexible salary, depending on experience. The Tor 
Project has a competitive benefits package, including a generous PTO policy; 14 
paid holidays per year (including the week between Christmas and New Year's, 
when the office is closed); 

[tor-commits] [webwml/staging] Change Cindy's description to third person

2018-06-26 Thread boklm
commit 9f73a34662697bba0a3b592187dd2505767e7c3c
Author: Damian Johnson 
Date:   Thu Jun 21 10:40:31 2018 -0700

Change Cindy's description to third person

Requested by Cindy.
---
 about/en/corepeople.wml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/about/en/corepeople.wml b/about/en/corepeople.wml
index e704aeed..bbcfccd8 100644
--- a/about/en/corepeople.wml
+++ b/about/en/corepeople.wml
@@ -146,7 +146,7 @@
   
   https://www.eff.org/files/key_cindy.txt;>
   Cindy Cohn
-  Tor Board member and https://www.eff.org/about/staff/cindy-cohn;>Executive Director of the 
EFF. Lawyer by training, https://blog.torproject.org/blog/tor-heart-notes-board-member;>my 
focus is on making sure Tor stays available and that Tor users stay 
safe.
+  Tor Board member and https://www.eff.org/about/staff/cindy-cohn;>Executive Director of the 
EFF. Lawyer by training, https://blog.torproject.org/blog/tor-heart-notes-board-member;>her 
focus is on making sure Tor stays available and that Tor users stay 
safe.
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Adjust Isis' people page entry

2018-06-26 Thread boklm
commit f02588f90306eb622b4fda65d14e2cabf4b7568b
Author: Damian Johnson 
Date:   Thu Jun 21 10:51:25 2018 -0700

Adjust Isis' people page entry

Changing the name, photo, and description as requested. I don't think
layout-wise we'll be able to include their middle name, but as before I'll 
make
layout adjustments after we have the pronouns.
---
 about/en/corepeople.wml |   4 ++--
 images/people/isis.png  | Bin 36028 -> 38311 bytes
 images/people/orig/isis.jpg | Bin 46059 -> 27804 bytes
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/about/en/corepeople.wml b/about/en/corepeople.wml
index 270ff568..d8fa37b7 100644
--- a/about/en/corepeople.wml
+++ b/about/en/corepeople.wml
@@ -340,9 +340,9 @@
   
   https://twitter.com/isislovecruft;>
   https://fyb.patternsinthevoid.net/isis.html;>
-  Isis Lovecruft
+  Isis Agora Lovecruft
   IRC: isis
-  Tor developer working on censorship 
circumvention, https://gitweb.torproject.org/bridgedb.git;>BridgeDB, and 
cryptographic research, design, and implementations.
+  isis works as a C and Rust developer on the Tor 
network daemon. They tend to focus on security, censorship circumvention, and 
cryptographic research and implementation.
 
   
 
diff --git a/images/people/isis.png b/images/people/isis.png
index d4c717cf..e28b804d 100644
Binary files a/images/people/isis.png and b/images/people/isis.png differ
diff --git a/images/people/orig/isis.jpg b/images/people/orig/isis.jpg
index 23a07deb..750facac 100644
Binary files a/images/people/orig/isis.jpg and b/images/people/orig/isis.jpg 
differ



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Add pronouns to the people page

2018-06-26 Thread boklm
commit 2867ba62433ec8c9f4f92f9079168b59f281c3ce
Merge: 49eec96a 83b90b64
Author: Damian Johnson 
Date:   Thu Jun 21 12:46:44 2018 -0700

Add pronouns to the people page

Proposed and information collected by Tom. Quite a few other changes were
requested at the same time...

  https://lists.torproject.org/pipermail/tor-project/2018-May/001776.html

 about/en/corepeople.wml  |  46 ++-
 images/people/ilv.png| Bin 38009 -> 0 bytes
 images/people/isis.png   | Bin 36028 -> 38311 bytes
 images/people/linda.png  | Bin 40598 -> 0 bytes
 images/people/orig/isis.jpg  | Bin 46059 -> 27804 bytes
 images/people/orig/linda.jpg | Bin 910787 -> 0 bytes
 6 files changed, 32 insertions(+), 14 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Update Linus's description

2018-06-26 Thread boklm
commit 89f76aba2a35312af0da55392186ff633221046a
Author: Damian Johnson 
Date:   Thu Jun 21 10:57:32 2018 -0700

Update Linus's description
---
 about/en/corepeople.wml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/about/en/corepeople.wml b/about/en/corepeople.wml
index 8b77700f..5dbd2bd9 100644
--- a/about/en/corepeople.wml
+++ b/about/en/corepeople.wml
@@ -473,7 +473,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=8C4CD511095E982EB0EFBFA21E8BF34923291265;>
   Linus Nordberg
   IRC: ln5
-  Swedish advocate and Tor Board member. Works on 
implementing IPv6 in Tor, build automation, and runs a directory 
authority.
+  Swedish advocate and Tor Board member. He works 
on implementing IPv6 in Tor, build automation, and runs a directory 
authority.
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Update Matt's description

2018-06-26 Thread boklm
commit 581d875dc4c8a99d5cb92fbadf409dc86e9b2094
Author: Damian Johnson 
Date:   Thu Jun 21 11:00:29 2018 -0700

Update Matt's description
---
 about/en/corepeople.wml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/about/en/corepeople.wml b/about/en/corepeople.wml
index 5dbd2bd9..270ff568 100644
--- a/about/en/corepeople.wml
+++ b/about/en/corepeople.wml
@@ -513,7 +513,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=B7E105FC4E6D9377F89CBA4C83BCA95294FBBB0A;>
   Matt Traudt
   IRC: pastly
-  http://mattssi4lhud.onion/;>Implemented the http://www.robgjansen.com/publications/kist-sec2014.pdf;>KIST 
scheduler into Tor. Helps safely measure Tor. Says helpful things on 
IRC.
+  Matt http://mattssi4lhud.onion/;>implemented the http://www.robgjansen.com/publications/kist-sec2014.pdf;>KIST 
scheduler into Tor. He helps safely measure Tor and says helpful things on 
IRC.
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Drop Isis' middle name

2018-06-26 Thread boklm
commit 83b90b6430b18aee0b0ef3a35e05ffb1061032c2
Author: Damian Johnson 
Date:   Thu Jun 21 12:44:23 2018 -0700

Drop Isis' middle name

With the addition of pronouns the only entry to overflow is isis. They asked
for a longer description and to include their middle name but we can't do 
both.
We can re-add their middle name if they shorten their burb.
---
 about/en/corepeople.wml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/about/en/corepeople.wml b/about/en/corepeople.wml
index 5fcb619e..c3f3bd19 100644
--- a/about/en/corepeople.wml
+++ b/about/en/corepeople.wml
@@ -346,7 +346,7 @@
   
   https://twitter.com/isislovecruft;>
   https://fyb.patternsinthevoid.net/isis.html;>
-  Isis Agora Lovecruft
+  Isis Lovecruft
   IRC: isis
   Pronoun: http://pronoun.is/they/them;>they
   isis works as a C and Rust developer on the Tor 
network daemon. They tend to focus on security, censorship circumvention, and 
cryptographic research and implementation.



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [webwml/staging] Add pronouns to the people page

2018-06-26 Thread boklm
commit 4a591306bec225069096a4475a040d2ea962e1e3
Author: Damian Johnson 
Date:   Thu Jun 21 12:41:32 2018 -0700

Add pronouns to the people page

Proposed and information collected by Tom...

  https://lists.torproject.org/pipermail/tor-project/2018-May/001776.html
---
 about/en/corepeople.wml | 20 
 1 file changed, 20 insertions(+)

diff --git a/about/en/corepeople.wml b/about/en/corepeople.wml
index 1fa7ac9e..5fcb619e 100644
--- a/about/en/corepeople.wml
+++ b/about/en/corepeople.wml
@@ -31,6 +31,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=FDB16F45A477B314E87432EC61A208E16E7CB435;>
   Alexander Færøy
   IRC: ahf
+  Pronoun: http://pronoun.is/he;>he
   Works on core Tor development.
 
   
@@ -43,6 +44,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=FBF0E7DB1433018EE52D0DDA9FC34089CBE83CA3;>
   Alison Macrina
   IRC: flexlibris
+  Pronoun: http://pronoun.is/she;>she
   Leads the https://trac.torproject.org/projects/tor/wiki/org/teams/CommunityTeam;>Community
 Team and https://libraryfreedomproject.org;>Library Freedom 
Project. Works on support, outreach, and training.
 
 
@@ -146,6 +148,7 @@
   
   https://www.eff.org/files/key_cindy.txt;>
   Cindy Cohn
+  Pronoun: http://pronoun.is/she;>she
   Tor Board member and https://www.eff.org/about/staff/cindy-cohn;>Executive Director of the 
EFF. Lawyer by training, https://blog.torproject.org/blog/tor-heart-notes-board-member;>her 
focus is on making sure Tor stays available and that Tor users stay 
safe.
 
 
@@ -167,6 +170,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=68278CC5DD2D1E85C4E45AD90445B7AB9ABBEEC6;>
   Damian Johnson
   IRC: atagar
+  Pronoun: http://pronoun.is/he;>he
   Author of the https://stem.torproject.org/;>Stem python controller library and https://nyx.torproject.org/;>Nyx relay monitor.
 
 
@@ -300,6 +304,7 @@
   
   
   Ian Goldberg
+  Pronoun: http://pronoun.is/he;>he
   https://cs.uwaterloo.ca/~iang/;>Professor of CS at the https://uwaterloo.ca/;>University of Waterloo, developing https://otr.cypherpunks.ca/;>Off-the-Record Messaging among other 
things.
 
   
@@ -320,6 +325,7 @@
   
   https://gaffer.ptitcanardnoir.org/intrigeri/contact/;>
   intrigeri
+  Pronoun: http://pronoun.is/he;>he
   He is one of our main interfaces with the https://tails.boum.org/;>Tails project.
 
   
@@ -342,6 +348,7 @@
   https://fyb.patternsinthevoid.net/isis.html;>
   Isis Agora Lovecruft
   IRC: isis
+  Pronoun: http://pronoun.is/they/them;>they
   isis works as a C and Rust developer on the Tor 
network daemon. They tend to focus on security, censorship circumvention, and 
cryptographic research and implementation.
 
   
@@ -433,6 +440,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=0CC8157C2578EEE92B0745D64EFD4FDC3F46D41E;>
   Karsten Loesing
   IRC: karsten
+  Pronoun: http://pronoun.is/he;>he
   Primary researcher and developer into https://metrics.torproject.org/;>anonymous metrics which started as a 
National Science Foundation grant.
 
 
@@ -442,6 +450,7 @@
   
   Kat
   IRC: kat5
+  Pronoun: http://pronoun.is/she;>she
   Volunteer on the Community Team. Helps with 
t-shirts for relay operators and other odds and ends.
 
   
@@ -482,6 +491,7 @@
   
   Maria Xynou
   IRC: agrabeli
+  Pronoun: http://pronoun.is/she;>she
   Maria manages OONI's Partnership Program and 
writes research reports on internet censorship around the world.
 
   
@@ -493,6 +503,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=2602B0DD0EB238CCE037196A0E36124F8E990F6E;>
   Mark Smith
   IRC: mcs
+  Pronoun: http://pronoun.is/he;>he
   Developer on the Tor Browser team.
 
 
@@ -583,6 +594,7 @@
   
   Nick Hopper
   IRC: nickhopper
+  Pronoun: http://pronoun.is/he;>he
   https://www-users.cs.umn.edu/~hopper/;>Researcher interested in 
improving Tor's performance and resistance to traffic analysis. Some of my work 
is described https://www-users.cs.umn.edu/~hopper/research.html;>here.
 
   
@@ -595,6 +607,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=2133BC600AB133E1D826D173FE43009C4607B1FB;>
   Nick Mathewson
   IRC: nickm
+  Pronoun: http://pronoun.is/he;>he
   One of the three original designers of Tor - 
does a lot of the ongoing design work, and coordinates and leads ongoing 
development.
 
 
@@ -604,6 +617,7 @@
   https://db.torproject.org/fetchkey.cgi?fingerprint=6AB6AEE9776E782723C8ACE83E39CEABFC69F6F7;>
   Nicolas Vigier
   IRC: boklm
+  Pronoun: http://pronoun.is/he;>he
   Works on Tor Browser.
 
   
@@ -745,6 +759,7 @@
   
   Shari Steele
   IRC: ssteele
+  Pronoun: http://pronoun.is/she;>she
   Executive 

<    1   2   3   4   >