Commit Graph
17276 Commits
Author SHA1 Message Date
Nick Mathewson c2dfae78d3 Refactor format_*_number_sigsafe to have a common implementation 2013-11-18 10:43:16 -05:00
Nick Mathewson c3ea946839 Reseolve DOCDOC and XXXXs in backtrace.c 2013-11-18 10:43:15 -05:00
Nick Mathewson 56e3f056e9 Tests for backtrace.c
These need to be a separate executable, since the point of backtrace.c
is that it can crash and write stuff.
2013-11-18 10:43:15 -05:00
Nick Mathewson 0cf234317f Unit tests for new functions in log.c 2013-11-18 10:43:15 -05:00
Nick Mathewson d631ddfb59 Make backtrace handler handle signals correctly.
This meant moving a fair bit of code around, and writing a signal
cleanup function.  Still pretty nice from what I can tell, though.
2013-11-18 10:43:15 -05:00
Nick Mathewson 2662885aa9 Use pc_from_ucontext.m4 from Google Performance Tools
This M4 module lets us learn the right way (out of at least 18
possibilities) to extract the current PC for stack-trace-fixup-in-signal
purposes.  The Google Performance Tools license is 3-clause BSD.
2013-11-18 10:43:15 -05:00
Nick Mathewson ce8ae49c94 Improve new assertion message logging
Don't report that a failure happened in the assertion_failed function just
because we logged it from there.
2013-11-18 10:43:15 -05:00
Nick Mathewson bd8ad674b9 Add a sighandler-safe logging mechanism
We had accidentially grown two fake ones: one for backtrace.c, and one
for sandbox.c.  Let's do this properly instead.

Now, when we configure logs, we keep track of fds that should get told
about bad stuff happening from signal handlers.  There's another entry
point for these that avoids using non-signal-handler-safe functions.
2013-11-18 10:43:15 -05:00
Nick Mathewson b0023083c4 On Linux (and some other systems) we need -rdynamic for backtraces 2013-11-18 10:43:14 -05:00
Nick Mathewson 063bea58bc Basic backtrace ability
On platforms with the backtrace/backtrace_symbols_fd interface, Tor
can now dump stack traces on assertion failure.  By default, I log
them to DataDir/stack_dump and to stderr.
2013-11-18 10:43:14 -05:00
Nick Mathewson f6d8bc9389 Refactor the assertion-failure code into a function 2013-07-19 13:40:20 -04:00
Nick Mathewson 5343ee1a06 Add a signal-safe decimal formatting function 2013-07-19 13:26:25 -04:00
Nick Mathewson 8f0755fa85 Whoops; check in test_circuitmux.c 2013-07-19 12:05:38 -04:00
Nick Mathewson d2cd0dfd14 Merge branch 'bug9296' 2013-07-19 11:58:20 -04:00
Nick Mathewson 34ad7642c8 Regression test for destroy cell queue
This exercises the code that crashed and caused #9296.
2013-07-19 10:17:00 -04:00
Nick Mathewson 18845c5507 Initialize destroy_cell_queue.
Likely fix for the crash bug of #9296, which was introduced through a
combination of #7912 and #8586.  Bugfix not in any released Tor.
2013-07-19 09:49:35 -04:00
Nick Mathewson e1d3b44495 Merge remote-tracking branch 'origin/maint-0.2.4' 2013-07-18 23:17:57 -04:00
Nick Mathewson 17a960734a Merge remote-tracking branch 'public/bug9295_023' into maint-0.2.4 2013-07-18 23:17:05 -04:00
Nick Mathewson e9c2484311 Fix for bug 9295: Don't crash when running --hash-password.
Fix on 0.2.4.15-rc; I'm doing this branch against 0.2.3, since we're
considering #9122 for an 0.2.3 backport, and if we do, we should merge
this too.
2013-07-18 23:15:46 -04:00
Nick Mathewson 5977435629 tmp 2013-07-18 23:08:36 -04:00
Nick Mathewson f45e1fbd5b Start of a unit test for options_validate.
I added this so I could write a unit test for ServerTransportOptions,
but it incidentally exercises the succeed-on-defaults case of
options_validate too.
2013-07-18 14:40:12 -04:00
Nick Mathewson abedd35de0 Merge branch 'simpleq_for_cells_3' 2013-07-18 11:24:57 -04:00
Nick Mathewson 1e78100b25 Add a test for n_cells_in_circuit_queues 2013-07-18 11:23:45 -04:00
Nick Mathewson ae64197195 Unit tests for cell queues.
This removes some INLINE markers from functions that probably didn't
need them.
2013-07-18 11:23:45 -04:00
Nick Mathewson 1047e7dcb0 Use TOR_SIMPLEQ for packed_cell_t 2013-07-18 11:23:45 -04:00
Nick Mathewson 27ec1fafe4 Remove a redundant declaration 2013-07-18 08:56:02 -04:00
Nick Mathewson 95597ab176 Remove a stray debugging echo from configure.ac 2013-07-18 08:54:28 -04:00
Nick Mathewson e6c0fb2b6d Fix a wide line in test_pt.c 2013-07-18 08:49:52 -04:00
Nick Mathewson d7ccb6a3b1 Merge branch 'bug8978_rebase_2'
Conflicts:
	src/test/test_pt.c
2013-07-18 08:48:20 -04:00
Nick Mathewson b551988ef4 Merge branch 'bug8929_rebase_2' 2013-07-18 08:45:13 -04:00
Nick Mathewson 8a01a7c35b Improve test coverage of 8929 code 2013-07-18 08:45:03 -04:00
Nick Mathewson 31871f7d77 Fix memory leaks in test_config_parse_transport_options_line 2013-07-18 08:45:03 -04:00
Nick Mathewson 713ff2f5ef Document what "escape" means in tor_escape_str_for_pt_args 2013-07-18 08:45:03 -04:00
George Kadianakis c71809d403 Insert the environment variable only if we have options to pass. 2013-07-18 08:45:03 -04:00
George Kadianakis 133f380c87 Add changes file and enrich the manual page. 2013-07-18 08:45:03 -04:00
George Kadianakis 1ee3a0cf44 Place the options in the environment after processing them properly. 2013-07-18 08:45:03 -04:00
George Kadianakis 1a0cf08841 Rename tor_escape_str_for_socks_arg() to something more generic.
Since we are going to be using that function to also escape parameters
passed to transport proxies using environment variables.
2013-07-18 08:45:03 -04:00
George Kadianakis ea72958f25 Pass characters to be escaped to tor_escape_str_for_socks_arg().
This is in preparation for using tor_escape_str_for_socks_arg() to
escape server-side pluggable transport parameters.
2013-07-18 08:45:02 -04:00
George Kadianakis 6cfc2b5d73 Write unit tests for the ServerTransportOptions parsing function. 2013-07-18 08:45:02 -04:00
George Kadianakis 08d9807125 Write function that parses ServerTransportOptions torrc lines.
And use it to validate them.
2013-07-18 08:45:02 -04:00
Nick Mathewson e02b6b99f2 Add a basic unit test for pt_get_extra_info_descriptor_string. 2013-07-18 08:43:53 -04:00
Nick Mathewson dd18789a9c Add a unit test for smethod lines with arguments. 2013-07-18 08:43:52 -04:00
George Kadianakis 924946aaaf Write transport ARGS to extra-info descriptor. 2013-07-18 08:43:52 -04:00
George Kadianakis 8bb2ba13c1 Extract ARGS from SMETHOD line and attach them to transport. 2013-07-18 08:43:52 -04:00
Nick Mathewson dd44ff663e A python script to combin gcov output with git blame 2013-07-16 15:31:07 -04:00
Nick Mathewson f797ac465f Merge remote-tracking branch 'origin/maint-0.2.4' 2013-07-16 14:49:41 -04:00
Nick Mathewson c36bdbd535 Re-do a cast in order to make old buggy freebsd gcc happy
Fix for #9254.  Bugfix on 0.2.4.14-alpha.

This is not actually a bug in the Tor code.
2013-07-16 14:48:12 -04:00
Nick Mathewson 4824f3ad93 Merge remote-tracking branch 'asn/bug9265' 2013-07-16 09:55:51 -04:00
Nick Mathewson 74356aaeec Remove an unused variable in test_replaycache_scrub 2013-07-16 09:53:44 -04:00
Andrea Shepard e5d3efd892 Make contrib/coverage smarter about check file-existence edge cases 2013-07-16 06:40:08 -07:00