summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2016-08-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-08-19Avoid confusing GCC 4.2.1 by saying "int foo()... inline int foo() {...}"Nick Mathewson
Fixes bug 19903; bugfix on 0.2.8.1-alpha.
2016-08-12Merge remote-tracking branch 'public/Fix_19450'Nick Mathewson
2016-08-12Fix integer overflows in the conversion tablescypherpunks
2016-08-11Only use evutil_secure_rng_add_bytes() when present.Nick Mathewson
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-11Fix a bug in the old-gcc version of ENABLE_GCC_WARNINGNick Mathewson
Fixes bug 19901; bugfix on 0.2.9.1-alpha.
2016-08-02Search for remaining references to 'bufferevent'.Nick Mathewson
Remove or adjust as appropriate.
2016-08-02Bufferevent removal: remove more bufferevent-only optionsNick Mathewson
(All this IOCP stuff was bufferevent-only.)
2016-08-02Remove USE_BUFFEREVENTS code outside src/orNick Mathewson
2016-07-29Keep make check-spaces happyAndrea Shepard
2016-07-28Three more -Wshadow fixes.Nick Mathewson
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-07-28Merge branch 'bug18902_squashed'Nick Mathewson
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-07-26Fix an integer overflow related to monotonic time on windows.Nick Mathewson
To maintain precision, to get nanoseconds, we were multiplying our tick count by a billion, then dividing by ticks-per-second. But that apparently isn't such a great idea, since ticks-per-second is sometimes a billion on its own, so our intermediate result was giving us attoseconds. When you're counting in attoseconds, you can only fit about 9 seconds into an int64_t, which is not so great for our purposes. Instead, we now simplify the 1000000000/1000000000 fraction before we start messing with nanoseconds. This has potential to mess us up if some future MS version declares that performance counters will use 1,000,000,007 units per second, but let's burn that bridge when we come to it.
2016-07-26Add a function to simplify a fraction.Nick Mathewson
Apparently remembering euclid's algorithm does pay off sooner or later.
2016-07-26Remove windows debugging prints: it was an integer overflow hitting ftrapvNick Mathewson
2016-07-26fix identifier mistake :(Nick Mathewson
2016-07-26Redux^3: Temporarily add windows verbosity to track down jenkins failuresNick Mathewson
2016-07-26Redux^2: Temporarily add windows verbosity to track down jenkins failuresNick Mathewson
2016-07-26Tweaks on 19435 fix:Nick Mathewson
* Raise limit: 16k isn't all that high. * Don't log when limit exceded; log later on. * Say "over" when we log more than we say we log. * Add target version to changes file
2016-07-26Fix integer overflow in the rate-limiter (#19435).Ivan Markin
2016-07-26debugging: print ticks-per-second on windows. is it 0?Nick Mathewson
2016-07-26Temporarily add some windows verbosity to track down unit test failure on ↵Nick Mathewson
jenkins.
2016-07-26Try a little harder to work around mingw clock_gettime weirdnessNick Mathewson
2016-07-25Also ship compat_time.h in release tarballs. Fixes bug #19746Peter Palfrader
2016-07-21ug no, the RIGHT fix.Nick Mathewson
2016-07-21Avoid infinite stack explosion in windows monotime.Nick Mathewson
[init calls get calls init calls get calls init.... ]
2016-07-21Once more, 32-bit fixes on monotime mockingNick Mathewson
2016-07-21Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-21Coverity hates it when we do "E1 ? E2 : E2".Nick Mathewson
It says, 'Incorrect expression (IDENTICAL_BRANCHES)' Fix for CID 1364127. Not in any released Tor.
2016-07-21loony mingwcross bug: insist we dont have clock_gettime.Nick Mathewson
2016-07-21fix monotime test mocking on 32-bit systemsNick Mathewson
2016-07-21Actually make monotonic time functions mockable.Nick Mathewson
This is different from making the functions mockable, since monotime_t is opaque and so providing mocks for the functions is really hard.
2016-07-21Revert "Make the monotonic{_coarse,}_get() functions mockable."Nick Mathewson
This reverts commit 2999f0b33fec8e91ba8e4680d3f9d03b09fe9501.
2016-07-21Make the monotonic{_coarse,}_get() functions mockable.Nick Mathewson
2016-07-19Merge branch 'monotonic_v2_squashed'Nick Mathewson
2016-07-19Make sure initialized_at is initialized before use.Nick Mathewson
2016-07-19Expose monotonic time ratchet functions for testing.Nick Mathewson
2016-07-19Remove tor_gettimeofday_cached_monotonic as broken and unneededNick Mathewson
2016-07-19convert timers.c to use real monotonic time.Nick Mathewson
2016-07-19Basic portable monotonic timer implementationNick Mathewson
This code uses QueryPerformanceCounter() [**] on Windows, mach_absolute_time() on OSX, clock_gettime() where available, and gettimeofday() [*] elsewhere. Timer types are stored in an opaque OS-specific format; the only supported operation is to compute the difference between two timers. [*] As you know, gettimeofday() isn't monotonic, so we include a simple ratchet function to ensure that it only moves forward. [**] As you may not know, QueryPerformanceCounter() isn't actually always as monotonic as you might like it to be, so we ratchet that one too. We also include a "coarse monotonic timer" for cases where we don't actually need high-resolution time. This is GetTickCount{,64}() on Windows, clock_gettime(CLOCK_MONOTONIC_COARSE) on Linux, and falls back to regular monotonic time elsewhere.
2016-07-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-17Merge remote-tracking branch 'weasel/bug19660' into maint-0.2.8Nick Mathewson
2016-07-13Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-13Merge remote-tracking branch 'Jigsaw52/seccomp-fix-18397' into maint-0.2.8Nick Mathewson
2016-07-11Add (SOCK_DGRAM, IPPROTO_UDP) sockets to the sandboxing whitelistPeter Palfrader
If we did not find a non-private IPaddress by iterating over interfaces, we would try to get one via get_interface_address6_via_udp_socket_hack(). This opens a datagram socket with IPPROTO_UDP. Previously all our datagram sockets (via libevent) used IPPROTO_IP, so we did not have that in the sandboxing whitelist. Add (SOCK_DGRAM, IPPROTO_UDP) sockets to the sandboxing whitelist. Fixes bug 19660.
2016-07-09Adds missing syscalls to seccomp filter.Daniel Pinto
Fixes #18397 which prevented tor starting with Sandbox 1.
2016-07-08Move our "what time is it now" compat functions into a new moduleNick Mathewson
I'm not moving our "format and parse the time" functions, since those have been pretty volatile over the last couple of years.
2016-07-08Merge remote-tracking branch 'sebastian/libevent2'Nick Mathewson