| Commit message (Collapse) | Author | Age |
... | |
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These functions can return NULL for otherwise-valid values of
time_t. Notably, the glibc gmtime manpage says it can return NULL
if the year if greater than INT_MAX, and the windows MSDN gmtime
page says it can return NULL for negative time_t values.
Also, our formatting code is not guaranteed to correctly handle
years after 9999 CE.
This patch tries to correct this by detecting NULL values from
gmtime/localtime_r, and trying to clip them to a reasonable end of
the scale. If they are in the middle of the scale, we call it a
downright error.
Arguably, it's a bug to get out-of-bounds dates like this to begin
with. But we've had bugs of this kind in the past, and warning when
we see a bug is much kinder than doing a NULL-pointer dereference.
Boboper found this one too.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/common/compat.h
src/or/circuitlist.c
src/or/circuituse.c
src/or/or.h
src/or/rephist.c
|
| | |
|
|\|
| |
| |
| |
| |
| |
| | |
Trivial Conflicts in
src/common/crypto.c
src/or/main.h
src/or/or.h
|
| |
| |
| |
| | |
About 860 doxygen-less things remain in 0.2.2
|
|\| |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On Windows, we never use pthreads, since it doesn't usually exist,
and when it does it tends to be a little weirdly-behaved. But some
mingw installations have a pthreads installed, so autoconf detects
pthread.h and tells us about it. This would make us include
pthread.h, which could make for trouble when the iffy pthread.h
tried to include config.h.
This patch changes compat.h so that we never include pthread.h on
Windows. Fixes bug 2313; bugfix on 0.1.0.1-rc.
|
|\| | |
|
| |\|
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/common/test.h
src/or/test.c
|
| | | |
|
|\| | |
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/common/memarea.c
src/or/or.h
src/or/rendclient.c
|
| | |
| | |
| | |
| | | |
This will avoid some signed/unsigned assignment-related bugs.
|
|\ \ \ |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Still to go: some pipes, all stdio files.
|
|\ \ \ \
| |/ / /
|/| / /
| |/ /
| | | |
Conflicts:
src/or/relay.c
|
| | |
| | |
| | |
| | | |
On windows, it's called something different.
|
| | |
| | |
| | |
| | |
| | |
| | | |
We can't use the platform timercmp, because
1) some platforms don't have them
2) some that do have them only support certain relational operators
|
|/ /
| |
| |
| |
| |
| |
| | |
This is needed for IOCP, since telling the IOCP backend about all
your CPUs is a good idea. It'll also come in handy with asn's
multithreaded crypto stuff, and for people who run servers without
reading the manual.
|
| |
| |
| |
| | |
unused/redundant wince includes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most of the changes here are switches to use APIs available on Windows
CE. The most pervasive change is that Windows CE only provides the
wide-character ("FooW") variants of most of the windows function, and
doesn't support the older ASCII verions at all.
This patch will require use of the wcecompat library to get working
versions of the posix-style fd-based file IO functions.
[commit message by nickm]
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
asprintf() is a GNU extension that some BSDs have picked up: it does a printf
into a newly allocated chunk of RAM.
Our tor_asprintf() differs from standard asprintf() in that:
- Like our other malloc functions, it asserts on OOM.
- It works on windows.
- It always sets its return-field.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | | |
Conflicts:
src/common/test.h
src/or/test.c
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For my 64-bit Linux system running with GCC 4.4.3-fc12-whatever, you
can't do 'printf("%lld", (int64_t)x);' Instead you need to tell the
compiler 'printf("%lld", (long long int)x);' or else it doesn't
believe the types match. This is why we added U64_PRINTF_ARG; it
looks like we needed an I64_PRINTF_ARG too.
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit implements a new config option: 'DisableAllSwap'
This option probably only works properly when Tor is started as root.
We added two new functions: tor_mlockall() and tor_set_max_memlock().
tor_mlockall() attempts to mlock() all current and all future memory pages.
For tor_mlockall() to work properly we set the process rlimits for memory to
RLIM_INFINITY (and beyond) inside of tor_set_max_memlock().
We behave differently from mlockall() by only allowing tor_mlockall() to be
called one single time. All other calls will result in a return code of 1.
It is not possible to change DisableAllSwap while running.
A sample configuration item was added to the torrc.complete.in config file.
A new item in the man page for DisableAllSwap was added.
Thanks to Moxie Marlinspike and Chris Palmer for their feedback on this patch.
Please note that we make no guarantees about the quality of your OS and its
mlock/mlockall implementation. It is possible that this will do nothing at all.
It is also possible that you can ulimit the mlock properties of a given user
such that root is not required. This has not been extensively tested and is
unsupported. I have included some comments for possible ways we can handle
this on win32.
|
| | |
|
|/
|
|
|
|
| |
I don't think we actually use (or plan to use) strtok_r in a reentrant
way anywhere in our code, but would be nice not to have to think about
whether we're doing it.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a function to determine whether we're in the main
thread, and changes control_event_logmsg() to return immediately if
we're in a subthread. This is necessary because otherwise we will
call connection_write_to_buf, which modifies non-locked data
structures.
Bugfix on 0.2.0.x; fix for at least one of the things currently
called "bug 977".
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It seems that 64-bit Sparc Solaris demands 64-bit-aligned access to
uint64_t, but does not 64-bit-align the stack-allocated char array we
use for cpuworker tags. So this patch adds a set/get_uint64 pair, and
uses them to access the conn_id field in the tag.
svn:r18743
|
|
|
|
| |
svn:r18203
|
|
|
|
|
|
| |
parsing mismatches on different platforms.
svn:r18189
|
|
|
|
|
|
|
|
| |
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed. They were not actually useful for
telling the version of Tor files in the wild.
svn:r17867
|
|
|
|
|
|
| |
we ever did.
svn:r17827
|
|
|
|
|
|
| |
not to collide with any system headers. This tripped us up on Android.
svn:r17805
|
|
|
|
|
|
| |
instead, use the standard convert-to-boolean hack of "svn st"
svn:r17597
|
|
|
|
|
|
| |
too.
svn:r17490
|
|
|
|
|
|
| |
and one to move the fd to the end of the file.
svn:r17454
|
|
|
|
| |
svn:r17444
|
|
|
|
| |
svn:r17261
|
|
|
|
|
|
| |
set supplementary groups, deprecated the Group option, and log more information on credential switching
svn:r17200
|
|
|
|
| |
svn:r17161
|