aboutsummaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2019-09-11Merge branch 'tor-github/pr/1296'David Goulet
2019-09-11Extract common list of flags to use for obsolete variables.Nick Mathewson
2019-09-11Revise documentation on CFLG_* flagsNick Mathewson
2019-09-11Remove all CVFLAG_* usage.Nick Mathewson
2019-09-11Remove all VTFLAG_* usage.Nick Mathewson
2019-09-11confparse, conftypes: Replace flags with their new names.Nick Mathewson
The old names remain as #defines that cause variables to get one or more flags. Now every flag-testing function in confparse.c tests exactly one flag.
2019-09-11Replace low-level {var_type,struct_var}_is_*() with flag inspectionNick Mathewson
Since the flags are now stored with compatible numbering, we can just OR them together and see whether the flag we want is in the result. (Net code removal!)
2019-09-11Re-number VTFLAG_* values so they don't conflict with CVFLAG_*Nick Mathewson
2019-09-11Move VTFLAG_* declarations to conftypes.hNick Mathewson
2019-09-11typed_var: Make flags into an unsigned OR of bits.Nick Mathewson
Using a bitfield here will enable us to unify the var_type_def_t flags with the config_var_t flags. (This commit does not yet do that unification, and does not yet rename or refactor any flags. It only changes booleans into bits.)
2019-09-11struct_var: refactor struct_var_is*() functions to delegateNick Mathewson
Previously they checked the individual flags inside var_type_def_t; now they call the appropriate var_type_is_*() functions. (These functions will be removed entirely by the end of this branch.)
2019-09-11Merge branch 'tor-github/pr/1311'David Goulet
2019-09-11Merge branch 'tor-github/pr/1307'George Kadianakis
2019-09-10Merge branch 'bug31615_041' into bug31615_masterteor
Merged modified lines from bug31615_041, and unmodified lines from master.
2019-09-10Merge branch 'bug31615_040' into bug31615_041teor
Merged modified lines from bug31615_040, and unmodified lines from maint-0.4.1.
2019-09-09build: The <sys/sysctl.h> is now deprecated on LinuxDavid Goulet
Closes #31673
2019-09-09Merge branch 'tor-github/pr/1298'David Goulet
2019-09-09Merge branch 'tor-github/pr/1287'David Goulet
2019-09-06subsys: Make the subsystem init order match the module dependenciesteor
Fix levels for subsystems that depend on log/err * winprocess (security) doesn't use err: * call windows process security APIs as early as possible * init err after winprocess * move wallclock so it's still after err * network and time depend on log: * make sure that network and time can use logging. * init network and time after log Add comments explaining the module init order. Fixes bug 31615; bugfix on 0.4.0.1-alpha.
2019-09-05Remove unused struct_var_* functions.Nick Mathewson
These turned out to be unnecessary, so let's not keep them around and let them start getting complicated. Closes ticket 31630.
2019-09-05Merge branch 'tor-github/pr/1295'George Kadianakis
2019-09-05Merge branch 'tor-github/pr/1294'George Kadianakis
2019-09-05Merge branch 'tor-github/pr/1293'George Kadianakis
2019-09-04Remove _ex suffix from typed_var_*_ex() functions.Nick Mathewson
Now that the variants of these functions that took config_line_t are gone, there is no longer any reason for the remaining variants to have "ex" at the end of their names. This commit was made by running this perl script over all the files in src/: #!/usr/bin/perl -w -i -p s{typed_var_(assign|free|encode|copy|eq|ok|kvassign|kvencode|mark_fragile)_ex} {typed_var_$1}g;
2019-09-04typedvar: remove now-unused functions taking config_type_t.Nick Mathewson
These functions are no longer used. Part of 31629.
2019-09-04Document fields of struct_magic_decl_t.Nick Mathewson
2019-09-04buffers: use ptrdiff_t to indicate offsets.Nick Mathewson
Previously we used int in some places and off_t for others. Neither is correct: ptrdiff_t is right for differences between pointers. (off_t is only for offsets and sizes on the filesystem.)
2019-09-04compat_compiler: fix documentation for STRUCT_VAR_PNick Mathewson
Previously we had said that off_t was a reasonable type to hold the result of offsetof(). That isn't so: ptrdiff_t is correct.
2019-09-04smartlist_pqueue: use ptrdiff_t instead of int for offsets.Nick Mathewson
This is technically correct, but should not matter in practice, since we don't use this on any structs whose size exceeds INT_MAX.
2019-09-04config: explain CONFIG_TYPE_EXTENDEDNick Mathewson
Also add an explanation of a possible future refactoring where we might remove the config_type_t enumeration entierly. Fixes ticket 31624. No changes file, since this is a comment-only change.
2019-09-04config: use ptrdiff_t for all field-offset members.Nick Mathewson
Previously we used int here, but it is more correct to use ptrdiff_t. (This never actually matters for our code in practice, since the structure we are managing here never exceed INT_MAX in size.)
2019-09-04Merge remote-tracking branch 'tor-github/pr/1270'Nick Mathewson
2019-09-04torerr: Fix a comment typo and update the comment for format_number_sigsafe()teor
Closes 31612.
2019-09-04Merge branch 'bug31571_041' into bug31571_masterteor
2019-09-04Merge branch 'bug31571_040' into bug31571_041teor
2019-09-04Merge branch 'bug31571_035' into bug31571_040teor
2019-09-04backtrace: Check the return values of snprintf() and strncpy()teor
We can't use strlcat() or strlcpy() in torerr, because they are defined in string/compat_string.h on some platforms, and string uses torerr. Part of 31571.
2019-08-30torerr: Try harder to flush raw assert messages before process terminationteor
Some platforms (macOS, maybe others?) can swallow the last write before an abort. This issue is probably caused by a race condition between write buffer cache flushing, and process termination. So we write an extra newline, to make sure that the message always gets through. Fixes bug 31571; bugfix on 0.3.5.1-alpha.
2019-08-30torerr: Log the Tor backtrace version when a raw assertion failsteor
Part of 31571.
2019-08-30backtrace: Log the Tor backtrace version whenever we log a backtraceteor
Previously, we just logged it in the crash handler. Part of 31571.
2019-08-30backtrace: Always set a backtrace Tor versionteor
We want to report the tor version, even on platforms that don't have backtrace support (like Android). This commit stores the backtrace Tor version, regardless of USE_BACKTRACE. Preparation for 31571.
2019-08-29string: macOS --enable-fragile-hardening uses safe string functionsteor
Comment-only change.
2019-08-27Merge branch 'tor-github/pr/1237'George Kadianakis
2019-08-24clarify usage of __ and ___ prefixes on config optionsNick Mathewson
2019-08-24whitespace fixNick Mathewson
2019-08-22Merge branch 'ticket30935' into ticket30935_mergedNick Mathewson
2019-08-20Merge branch 'ticket30914' into ticket30914_mergedNick Mathewson
2019-08-19Fix 64-bit return issue in parse_log_domain()Nick Mathewson
If unsigned int is 32-bits long, then our old code would give a wrong result with any log domain whose mask was >= (1<<32). Fortunately, there are no such log domains right now: the domain mask is only 64 bits long to accommodate some flags. Found by coverity as CID 1452041. Fixes bug 31451; bugfix on 0.4.1.4-rc.
2019-08-12Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/1049' into maint-0.4.0teor