Commit Graph

526 Commits

Author SHA1 Message Date
cypherpunks bfe740f065 Refactor retrieving the current working directory
The GNU C Library (glibc) offers an function which allocates the
necessary memory automatically [0]. When it is available, we use that.

Otherwise we depend upon the `getcwd` function which requires a
preallocated buffer (and its size). This function was used incorrectly
by depending on the initial buffer size being big enough and otherwise
failing to return the current working directory. The proper way of
getting the current working directory requires a loop which doubles the
buffer size if `getcwd` requires it. This code was copied from [1] with
modifications to fit the context.

[0] https://www.gnu.org/software/hurd/hurd/porting/guidelines.html
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html
2017-08-04 12:22:53 -04:00
Nick Mathewson 8925e84beb version bump to 0.3.0.10-dev 2017-08-02 12:28:34 -04:00
Nick Mathewson 4f7955d5de Bump to 0.3.0.10 2017-08-01 14:38:49 -04:00
Nick Mathewson d9427c00df bump to 0.3.0.9-dev 2017-06-29 18:44:43 -04:00
Nick Mathewson 98ffb2e722 Update maint-0.3.0 to 0.3.0.9 2017-06-29 16:35:40 -04:00
Nick Mathewson c2e546aa23 Merge remote-tracking branch 'argonblue/bug22410' 2017-06-19 15:30:23 -04:00
Taylor Yu 027614c263 Ensure that uint8_t is unsigned char
Many places in our code assume that uint8_t is the same type as
unsigned char.  Test this assumption in the configure script.  This is
important because of the privileged aliasing properties of character
types in C.

Fixes #22410.
2017-06-19 14:28:36 -04:00
Nick Mathewson a3139c9750 Bump master to 0.3.2.0-alpha-dev. For 0.3.1, use maint-0.3.1 2017-06-19 11:57:44 -04:00
Nick Mathewson 6e7551c50d Add -dev to version number. 2017-06-08 14:05:32 -04:00
Nick Mathewson 90758b2606 Add -dev to version number. 2017-06-08 14:05:29 -04:00
Nick Mathewson 5e554215dd Add -dev to version number. 2017-06-08 14:05:27 -04:00
Nick Mathewson b533220249 bump to 0.2.9.11 2017-06-08 09:24:38 -04:00
Nick Mathewson a0664fd0c3 bump to 0.3.0.8 2017-06-08 09:24:28 -04:00
Nick Mathewson 78d4200abe Bump to 0.3.1.3-alpha. 2017-06-08 09:24:16 -04:00
Taylor Yu 90dd7dc92a Check for libzstd >= 1.1
The consensus compression code depends on a streaming compression API
that is new in libzstd-1.1.

Fixes #22413.
2017-05-30 13:25:34 -04:00
Nick Mathewson 5742e4fd8e bump version to 0.3.1.2-alpha-dev 2017-05-26 10:23:53 -04:00
Nick Mathewson 2550ac7bb1 update version to 0.3.1.2-alpha 2017-05-26 08:58:08 -04:00
Nick Mathewson 281f06a094 bump to 0.3.1.1-alpha 2017-05-22 11:52:19 -04:00
Nick Mathewson 69ef94820b Merge branch 'add_rust_squashed' 2017-05-19 08:47:18 -04:00
Sebastian Hahn 70c067102b Allow Rust build using locally supplied crates or crates.io
This adds a couple of configure commands to control whether we're
requiring all dependencies to be available locally (default) or not
(--enable-cargo-online-mode). When building from a tarball, we require
the RUST_DEPENDENCIES variable to point to the local repository of
crates. This also adds src/ext/rust as a git submodule that contains
such a local repository for easy setup.
2017-05-19 08:47:11 -04:00
Sebastian Hahn aeba64efad Detect rustc version 2017-05-19 08:47:11 -04:00
Sebastian Hahn d6f9a4f11a cargo-online-mode configure argument
Passing --enable-cargo-online-mode during configure allows cargo to make
network requests while building Tor or running tests. If this flag is
not supplied, the dependencies need to be available in the form of a
local mirror.
2017-05-19 08:47:11 -04:00
Nick Mathewson d1340bd5ac bump to 0.3.0.7-dev 2017-05-18 12:28:28 -04:00
Nick Mathewson 8324631dd9 bump version to 0.3.0.7 2017-05-15 18:25:07 -04:00
Taylor Yu 5a2f1a836f Fix help message for --enable-lzma
Fixes #22111.
2017-05-01 11:16:25 -04:00
Sebastian Hahn 915fa39d0f Add --enable-rust configure switch
Introduce a way to optionally enable Rust integration for our builds. No
actual Rust code is added yet and specifying the flag has no effect
other than failing the build if rustc and cargo are unavailable.
2017-04-29 08:55:57 +02:00
Nick Mathewson 7ae7e3c2d8 bump to 0.3.0.6-dev 2017-04-26 15:37:27 -04:00
Nick Mathewson 31b79f02ab Bump version to 0.3.0.6 2017-04-26 13:30:39 -04:00
David Goulet cb8ac1f331 trace: Add a basic event-tracing infrastructure.
This commit adds the src/trace directory containing the basics for our tracing
subsystem. It is not used in the code base. The "src/trace/debug.h" file
contains an example on how we can map our tor trace events to log_debug().

The tracing subsystem can only be enabled by tracing framework at compile
time. This commit introduces the "--enable-tracing-debug" option that will
make all "tor_trace()" function be maped to "log_debug()".

Closes #13802

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-25 10:37:31 -04:00
Alexander Færøy ce1feae9d9 Add --enable-zstd to our configure script.
This patch adds support for enabling support for Zstandard to our configure
script. By default, the --enable-zstd option is set to "auto" which means if
libzstd is available we'll build Tor with Zstandard support.

See: https://bugs.torproject.org/21662
2017-04-25 08:10:09 -04:00
Alexander Færøy 157af1d26e Add --enable-lzma to our configure script.
This patch adds support for enabling support for LZMA to our configure
script. By default, the --enable-lzma option is set to "auto" which
means if liblzma is available we'll build Tor with LZMA support.

See: https://bugs.torproject.org/21662
2017-04-25 08:06:02 -04:00
Nick Mathewson 06fe8a14c4 bump to 0.3.0.5-rc-dev 2017-04-05 10:03:09 -04:00
Nick Mathewson 6ec3228220 version bump 2017-04-03 09:36:42 -04:00
Nick Mathewson 7505f452c8 Run the copyright update script. 2017-03-15 16:13:17 -04:00
Nick Mathewson 528dcd113c Bump to 0.3.0.4-rc-dev 2017-03-01 15:38:36 -05:00
Nick Mathewson 75492598b2 Bump to 0.2.9.10-dev 2017-03-01 08:18:54 -05:00
Nick Mathewson 58908b6540 bump version to 0.3.0.4-rc 2017-02-28 10:40:08 -05:00
Nick Mathewson b049a5b398 bump version to 0.2.9.10 2017-02-28 10:38:55 -05:00
Nick Mathewson c0aa7ac5ac Merge branch 'disable_memory_sentinels_squashed' 2017-02-27 16:25:25 -05:00
Nick Mathewson b923c4dc9f Code to disable memory sentinels for fuzzing
This feature makes it possible to turn off memory sentinels (like
those used for safety in buffers.c and memarea.c) when fuzzing, so
that we can catch bugs that they would otherwise prevent.
2017-02-27 16:25:10 -05:00
Nick Mathewson 832d4636f5 Bump master to 0.3.1.0-alpha-dev 2017-02-15 14:36:56 -05:00
Nick Mathewson 54ec335434 Bump to 0.3.0.3-alpha-dev 2017-02-03 13:58:50 -05:00
Nick Mathewson 80a5beae62 Bump version to 0.3.0.3-alpha 2017-02-03 11:33:11 -05:00
cypherpunks 27df23abb6 Use the standard OpenBSD preprocessor definition 2017-02-03 09:37:39 -05:00
Nick Mathewson ec1b8020d5 Merge remote-tracking branch 'dgoulet/bug21290_030_01' 2017-02-01 10:44:45 -05:00
Nick Mathewson 24551d64ad Merge branch 'maint-0.2.9' 2017-02-01 10:39:59 -05:00
rubiate e9ec818c28 Support LibreSSL with opaque structures
Determining if OpenSSL structures are opaque now uses an autoconf check
instead of comparing the version number. Some definitions have been
moved to their own check as assumptions which were true for OpenSSL
with opaque structures did not hold for LibreSSL. Closes ticket 21359.
2017-02-01 10:30:49 -05:00
David Goulet 5335a8e6f8 Rename --enable-expensive-hardening configure option
It is renamed to --enable-fragile-hardening.

TROVE-2017-001 was triggerable only through the expensive hardening which is
making the tor daemon abort when the issue is detected. Thus, it makes tor
more at risk of remote crashes but safer against RCE or heartbleed bug
category.

Fixes #21290.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-02-01 10:27:10 -05:00
Nick Mathewson 558c04f5b1 Merge branch 'combined-fuzzing-v4' 2017-01-30 08:40:46 -05:00
Nick Mathewson 99d4faf6d3 oss_fuzz also requires no PIE 2017-01-30 08:37:25 -05:00
Nick Mathewson 1b244a64e4 libfuzzer tweaks per recommendations 2017-01-30 08:37:25 -05:00
Nick Mathewson eb414a08a9 Add libfuzzer support. 2017-01-30 08:37:25 -05:00
Nick Mathewson c4cc11a9df Bump to 0.3.0.2-alpha-dev 2017-01-23 14:38:10 -05:00
Nick Mathewson 0d4d9b6d88 Bump version to 0.2.9.9-dev 2017-01-23 14:34:08 -05:00
Nick Mathewson 4a93ed1ede Merge branch 'maint-0.2.9' 2017-01-23 08:55:40 -05:00
Nick Mathewson 767516680c TROVE-2017-001 : move -ftrapv back into --expensive-hardening. 2017-01-23 08:47:10 -05:00
Nick Mathewson beaeee25ae version bump (0.3.0.2-alpha) 2017-01-23 08:20:46 -05:00
Nick Mathewson 698df98837 version bump 2017-01-23 08:19:48 -05:00
Nick Mathewson f31b3857fe Merge branch 'bug20990_squashed_v2' 2017-01-11 10:24:54 -05:00
Nick Mathewson 114f57b23e Use the old replacement when AM_PROG_AR doesn't exist. 2017-01-11 10:24:13 -05:00
Nick Mathewson 1fbb66fa77 Merge branch 'maint-0.2.9' 2016-12-23 11:02:04 -05:00
cypherpunks d3c0b137af Remove dead code related to the old tor-fw-helper
This commit removes more code related to the old tor-fw-helper which was
removed in ticket 13338.

Closes ticket 21024.
2016-12-23 10:50:41 -05:00
cypherpunks b4c95bb42a Report errors when updating configuration files 2016-12-23 10:35:26 -05:00
cypherpunks a1c0ebc3eb Use AM_PROG_AR to improve portability
Turning on warnings in Automake makes it complain about not using the
AM_PROG_AR macro. The AM_PROG_AR macro is required when LIBRARIES or
LTLIBRARIES is used.

The macro looks for an archiver and wraps it in the ar-lib script which
is automatically generated so Git should ignore it.

It makes the custom check for 'ar' obsolete so it is removed.

The AM_PROG_AR macro was added in Automake 1.11.2 thus the minimum
Automake version is increased.
2016-12-23 10:35:22 -05:00
cypherpunks dee0b869c9 Use the Autoconf macro for finding sed
The AC_PROG_SED macro was added in Autoconf 2.59b and the minimum
supported Autoconf version is now 2.63 so we can safely assume it is
available.
2016-12-23 10:35:13 -05:00
cypherpunks be080a402f Replace obsolete macros with modern equivalents 2016-12-23 10:34:11 -05:00
Nick Mathewson 2f589e1057 Use event_base_new(), not event_init(), to detect libevent 2.
(event_init() is obsoleted in libevent 2.)

Fixes bug 21051; bugfix on 0.2.9.1-alpha when we dropped libevent 1
support.
2016-12-23 08:18:31 -05:00
Nick Mathewson 9bf89f80ce bump to 0.3.0.1-alpha-dev 2016-12-19 14:24:38 -05:00
Nick Mathewson 6a7cb21e13 Bump to 0.3.0.1-alpha 2016-12-19 13:14:24 -05:00
Nick Mathewson 897d3c6d13 Bump to 0.2.9.8-dev 2016-12-19 10:13:01 -05:00
Nick Mathewson 24318fbda9 Bump to 0.2.9.8 2016-12-19 08:08:44 -05:00
Nick Mathewson 2a00110e5b Revert "Stop checking whether environ is declared."
This reverts commit 954eeda619.

Apparently, OpenBSD is what expects you to declare environ
yourself.  So 19142 is a wontfix.
2016-12-16 12:16:52 -05:00
cypherpunks 032da29d28 Run check-spaces only when Perl is available
Also permit users to override the Perl variable with relative paths.
2016-12-16 10:52:15 -05:00
Nick Mathewson 954eeda619 Stop checking whether environ is declared.
There seems to be pretty good evidence that it's always declared,
and that checking for it is pointless.

Closes ticket 19142.
2016-12-12 10:55:10 -05:00
Nick Mathewson 8384f4d26f version bump: 0.2.9.7-rc-dev 2016-12-12 08:24:37 -05:00
Nick Mathewson cbdb3c92f5 Merge branch 'maint-0.2.9' 2016-12-11 22:23:31 -05:00
Nick Mathewson ef53526b10 Spell MAC_OS_X_VERSION_10_12 correctly.
Fixes 20935.
2016-12-11 22:17:14 -05:00
Nick Mathewson cf6da1e4c2 Bump version 0.2.9.7-rc 2016-12-11 21:39:50 -05:00
Nick Mathewson cf762c663d Bump to 0.2.9.6-rc-dev 2016-12-02 11:20:23 -05:00
Nick Mathewson 9e297f8197 Bump to 0.2.9.6-rc 2016-12-01 13:36:38 -05:00
Nick Mathewson fc47cc3ed9 Merge branch 'maint-0.2.9' 2016-12-01 10:06:17 -05:00
Nick Mathewson 52cb1edda6 Merge branch 'maint-0.2.8' into maint-0.2.9 2016-12-01 10:05:44 -05:00
Nick Mathewson 16fcbd21c9 Try to work around breakage in the OSX 10.12 SDK.
Apple is supposed to decorate their function declarations with
macros to indicate which OSX version introduced them, so that you
can tell the compiler that you want to build against certain
versions of OSX.  But they forgot to do that for clock_gettime() and
getentropy(), both of which they introduced in 10.12.

This patch adds a kludge to the configure.ac script where, if we
detect that we are targeting OSX 10.11 or earlier, we don't even probe
to see if the two offending functions are present.

Closes ticket 20235.
2016-11-22 19:24:13 -05:00
Nick Mathewson 4614f8e681 Merge remote-tracking branch 'teor/fix-mingw-pagesize' 2016-11-22 18:29:50 -05:00
Nick Mathewson 74e84b7eb7 Bump version to 0.2.9.5-alpha-dev 2016-11-08 07:55:15 -05:00
Nick Mathewson 3dfecffa7d bump version to 0.2.9.5-alpha 2016-11-07 16:38:53 -05:00
teor 8f465808a0
Check for getpagesize before using it to mmap files
This fixes compilation in some MinGW environments.

Fixes bug 20530; bugfix on commit bf72878 in tor-0.1.2.1-alpha.
Reported by "ice".
2016-11-03 08:44:57 +11:00
Nick Mathewson e12560db76 Bump version on master to 0.3.0.0-alpha-dev. 2016-10-19 17:03:22 -04:00
Nick Mathewson b0f1241a1d Bump to 0.2.8.9-dev 2016-10-17 16:32:11 -04:00
Nick Mathewson 702c1dcf7b Bump master to 0.2.9.4-alpha-dev 2016-10-17 16:31:40 -04:00
Nick Mathewson 0fa3811c78 bump to 0.2.8.9 2016-10-17 14:57:26 -04:00
Nick Mathewson edcad379cf Bump version to 0.2.9.4-alpha. 2016-10-17 14:05:42 -04:00
Nick Mathewson 850ec1e282 Stop implying that we support openssl 1.0.0; we don't.
Closes ticket 20303.

The LIBRESSL_VERSION_NUMBER check is needed because if our openssl
is really libressl, it will have an openssl version number we can't
really believe.
2016-10-06 12:58:49 -04:00
Nick Mathewson 6055bba8cc Only use -levent when checking functions if we will use it to link.
Fixes 19904; bugfix on b62abf9f21499ab; patch from Rubiate.
2016-10-06 09:16:21 -04:00
Nick Mathewson a633baf632 Merge branch 'osx_sierra_028' 2016-09-24 13:33:09 -07:00
Nick Mathewson 1eba088054 Fix compilation on OSX Sierra (10.12) 2016-09-24 08:48:47 -07:00
Nick Mathewson 9965059fbe Bump to 0.2.9.3-alpha-dev 2016-09-23 15:58:29 -04:00
Nick Mathewson ec19ecce4b Bump to 0.2.8.8-dev. 2016-09-23 15:58:06 -04:00
Nick Mathewson 33f81b8712 bump master to 0.2.9.3-alpha 2016-09-22 16:11:50 -04:00
Nick Mathewson ad1824f91d Update versions to 0.2.8.8 2016-09-22 15:37:06 -04:00
Nick Mathewson fe9cfeba6e Fix libevent linking on openbsd.
Closes ticket 19902; bugfix on 0.2.9.1-alpha; patch from rubiate
2016-09-08 10:09:34 -04:00
Nick Mathewson f3cda3272a Disable -Wthread-safety.
See changes file; closes ticket 20110.
2016-09-08 09:37:40 -04:00
Nick Mathewson e9124b8cc7 bump to 0.2.8.7-dev 2016-08-24 14:46:08 -04:00
Nick Mathewson 7be7f42d45 bump to 0.2.9.2-alpha-dev 2016-08-24 14:45:33 -04:00
Nick Mathewson 57ba7ab39a Bump to 0.2.8.7 2016-08-24 11:01:57 -04:00
Nick Mathewson e2ede7c9d5 Bump to 0.2.9.2-alpha 2016-08-24 11:01:33 -04:00
Nick Mathewson 7f145b54af Merge remote-tracking branch 'public/Fix_19450' 2016-08-12 16:11:28 -04:00
Nick Mathewson e788c577f1 Only use evutil_secure_rng_add_bytes() when present.
OpenBSD removes this function, and now that Tor requires Libevent 2,
we should also support the OpenBSD Libevent 2.

Fixes bug 19904; bugfix on 0.2.5.4-alpha.
2016-08-11 20:37:18 -04:00
Nick Mathewson 7e3e482dad bump master to 0.2.9.1-alpha.dev 2016-08-08 14:31:30 -04:00
Nick Mathewson 70fd23f498 Bump master version to 0.2.9.1-alpha 2016-08-02 15:37:35 -04:00
Nick Mathewson 4d4ccc505b Search for remaining references to 'bufferevent'.
Remove or adjust as appropriate.
2016-08-02 13:59:47 -04:00
Nick Mathewson ca67dd8367 Remove USE_BUFFEREVENTS from configure.ac 2016-08-02 13:22:25 -04:00
Nick Mathewson 6b740aa46b bump maint-0.2.8 to 0.2.8.6-dev 2016-08-02 11:13:44 -04:00
Nick Mathewson 11386eb6d1 bump to 0.2.8.6 2016-07-29 11:17:28 -04:00
Nick Mathewson a8676b1ede Merge branch 'bug18902_squashed' 2016-07-28 06:59:03 -04:00
Nick Mathewson 4757303873 Fix all -Wshadow warnings on Linux
This is a partial fix for 18902.
2016-07-28 06:58:44 -04:00
Nick Mathewson 4bdd3603f1 fix an error message in a configure warning string 2016-07-26 11:33:02 -04:00
Nick Mathewson a931d157fd Bump maint-0.2.8 to 0.2.8.5-rc-dev 2016-07-07 12:43:52 -04:00
Nick Mathewson 8f44d2822e Update version to 0.2.8.5-rc. This is not yet a release. 2016-07-05 13:05:36 -04:00
Sebastian Hahn 265e40b481 Raise libevent dependency to 2.0.10-stable or newer
Only some very ancient distributions don't ship with Libevent 2 anymore,
even the oldest supported Ubuntu LTS version has it. This allows us to
get rid of a lot of compat code.
2016-07-04 12:40:09 +02:00
U+039b e607a2d9a0 Fix #19449 Remove --disable-transparent configure option 2016-06-29 14:54:14 -04:00
cypherpunks 94762e37b9 Use the Autoconf macro AC_USE_SYSTEM_EXTENSIONS
The Autoconf macro AC_USE_SYSTEM_EXTENSIONS defines preprocessor macros
which turn on extensions to C and POSIX. The macro also makes it easier
for developers to use the extensions without needing (or forgetting) to
define them manually.

The macro can be safely used because it was introduced in Autoconf 2.60
and Tor requires Autoconf 2.63 and above.
2016-06-17 10:17:44 -04:00
Nick Mathewson e718a582af Bump to 0.2.8.4-rc-dev 2016-06-15 12:55:17 -04:00
Nick Mathewson 3a0d42fbf9 bump version to 0.2.8.4-rc 2016-06-14 20:36:35 -04:00
Nick Mathewson e54f8e3429 Remove some duplicated warnings from the big list 2016-06-14 19:28:56 -04:00
Nick Mathewson 99a7ddd6f9 Disable -Wc99-c11-compat
It triggers on the openssl headers, and doesn't seem to actually
help us.
2016-06-14 13:28:43 -04:00
Nick Mathewson 80f2c3555d Remove -Wc11-extensions
FreeBSD uses _Generic() in its system headers, and is within its
rights to do so.
2016-06-11 17:37:34 -04:00
Nick Mathewson cb71c5ddbb Whoops -- this got lost in the merge. 2016-06-11 12:58:24 -04:00
Nick Mathewson d6b2af7a3a Merge branch 'bug19180_easy_squashed' 2016-06-11 10:15:40 -04:00
Nick Mathewson e80a032b61 Add clang's -Wstring-conversion, and fix the one place it hits 2016-06-11 10:11:54 -04:00
Nick Mathewson 53a3b39da1 Add -Wmissing-variable-declarations, with attendant fixes
This is a big-ish patch, but it's very straightforward.  Under this
clang warning, we're not actually allowed to have a global variable
without a previous extern declaration for it.  The cases where we
violated this rule fall into three roughly equal groups:
  * Stuff that should have been static.
  * Stuff that was global but where the extern was local to some
    other C file.
  * Stuff that was only global when built for the unit tests, that
    needed a conditional extern in the headers.

The first two were IMO genuine problems; the last is a wart of how
we build tests.
2016-06-11 10:11:54 -04:00
Nick Mathewson 80f1a2cbbd Add the -Wextra-semi warning from clang, and fix the cases where it triggers 2016-06-11 10:11:54 -04:00
Nick Mathewson 26e979b342 Add all the clang-only warnings that do not trigger now 2016-06-11 10:11:53 -04:00
Nick Mathewson 15533c8897 Set our autoconf-breaking options last, not before we check for others 2016-06-11 10:11:53 -04:00
Nick Mathewson 9bbd6502f0 Use autoconf, not gcc version, to decide which warnings we have
This gives more accurate results under Clang, which can only help us
detect more warnings in more places.

Fixes bug 19216; bugfix on 0.2.0.1-alpha
2016-06-11 10:11:53 -04:00
Nick Mathewson ad16c55286 Use -Wstrict-overflow=2 on gcc5+. 2016-06-11 10:11:53 -04:00
Nick Mathewson 4caed2424a Enable -Woverlength-strings for GCC>=4.6 on MOST of the code.
IMO it's fine for us to make exceptions to this rule in the unit
tests, but not in the code at large.
2016-06-11 10:11:52 -04:00
Nick Mathewson 8f2d2933f9 Use -Wdouble-promotion in GCC >= 4.6
This warning triggers on silently promoting a float to a double.  In
our code, it's just a sign that somebody used a float by mistake,
since we always prefer double.
2016-06-11 10:11:52 -04:00
Nick Mathewson 493499a339 Add -Wfloat-conversion for GCC >= 4.9
This caught quite a few minor issues in our unit tests and elsewhere
in our code.
2016-06-11 10:11:52 -04:00
Nick Mathewson 2ff20c93a5 Add -Wunused-const-variable=2 on GCC >=6.1
This caused a trivial warning in curve25519-donna-64bit.h, which
had two unused constants.  I commented them out.
2016-06-11 10:11:52 -04:00
Nick Mathewson 12517c7303 Add -Wduplicated-cond on GCC 6 2016-06-11 10:11:52 -04:00
Nick Mathewson 4f8086fb20 Enable -Wnull-dereference (GCC >=6.1), and fix the easy cases
This warning, IIUC, means that the compiler doesn't like it when it
sees a NULL check _after_ we've already dereferenced the
variable. In such cases, it considers itself free to eliminate the
NULL check.

There are a couple of tricky cases:

One was the case related to the fact that tor_addr_to_in6() can
return NULL if it gets a non-AF_INET6 address.  The fix was to
create a variant which asserts on the address type, and never
returns NULL.
2016-06-11 10:10:29 -04:00
Nick Mathewson 57bf8bb263 remove now-irrelevant XXX020 comments in configure.ac
They apply to ancient GCC versions and to an unknown set of
configuration options. Notabug.
2016-05-30 15:31:19 -04:00
Nick Mathewson 55b5e0076f Add another 22 or so GCC warnings. None currently triggers for me. 2016-05-28 17:09:31 -04:00
Nick Mathewson 1e5ad15688 Merge remote-tracking branch 'arma/task19035-fixedup' 2016-05-27 13:22:16 -04:00
Nick Mathewson 617b920551 Merge remote-tracking branch 'public/hardening_flags_must_link' 2016-05-27 12:52:39 -04:00
Roger Dingledine 1ce1214d68 get rid of one more piece of --enable-instrument-downloads 2016-05-27 12:32:02 -04:00
cypherpunks c404905822 Fix indentation and quotation of the headers 2016-05-27 11:56:34 -04:00
cypherpunks ab8f1a9e9b Do not warn on missing headers 2016-05-27 11:56:30 -04:00
Nick Mathewson ce1dbbc4fd Enable the -Waggregate-return warning
Suppress it in the one spot in the code where we actually do want to
allow an aggregate return in order to call the mallinfo() API.
2016-05-27 11:26:14 -04:00