aboutsummaryrefslogtreecommitdiff
path: root/src/lib/err
AgeCommit message (Collapse)Author
2020-06-29Merge remote-tracking branch 'tor-github/pr/1722/head' into maint-0.4.2Nick Mathewson
2020-02-12err/log: Stop closing stderr and stdout during shutdownteor
Closing these file descriptors can hide sanitiser logs. Fixes bug 33087; bugfix on 0.4.1.6.
2019-12-05Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-12-05Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-10-22Merge remote-tracking branch 'tor-github/pr/1303' into maint-0.4.1Nick Mathewson
2019-10-22Merge remote-tracking branch 'tor-github/pr/1302' into maint-0.4.1Nick Mathewson
2019-10-20err: Use the correct type for cb_bufteor
Fixes bug 32060; bug not in any released version of tor. Resolves CID 1454761.
2019-10-07Merge remote-tracking branch 'tor-github/pr/1379'Nick Mathewson
2019-09-30err: Remove a duplicate header in backtrace.cteor
2019-09-30err: Always lock the backtrace buffer before it is usedteor
Fixes bug 31734; bugfix on 0.2.5.3-alpha.
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-30Merge branch 'tor-github/pr/1302'George Kadianakis
2019-09-26backtrace: avoid undefined behaviour on re-initialisationteor
cb_buf_mutex is statically initialised, so we can not destroy it when we are shutting down the err subsystem. If we destroy it, and then re-initialise tor, all our backtraces will fail. Part of 31736, but committed in this branch to avoid merge conflicts.
2019-09-24backtrace: Add a missing check for HAVE_PTHREAD_H before using mutexesteor
Fixes bug 31614; bugfix on 0.2.5.2-alpha.
2019-09-24backtrace: Disable signal handlers in remove_bt_handler()teor
Fixes bug 31614; bugfix on 0.2.5.2-alpha.
2019-09-12Merge branch 'tor-github/pr/1303'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-09Merge branch 'tor-github/pr/1287'David Goulet
2019-09-09log: Close log and err file descriptors before abortingteor
Part of 31594.
2019-09-09log: Don't close file log fds that are being used by the err moduleteor
Instead, dup() file log fds, before passing them to the err module. Closes 31613, part of 31594.
2019-09-09torerr: Close sigsafe fds on shutdownteor
And clear the list of error fds. Part of 31594.
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-04torerr: Fix a comment typo and update the comment for format_number_sigsafe()teor
Closes 31612.
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-07-19Extract the log_domain_t type to a lower-level headerNick Mathewson
This way, both err and log may depend on it.
2019-07-08Use a 64-bit mask for log domains, and fix a conflictNick Mathewson
When we added LD_MESG, we created a conflict with the LD_NO_MOCK flag. We now need 64 bits for log domains in order to fix this issue. Fixes bug 31080; bugfix on 0.4.1.1-alpha.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-09Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-09Fix (and make consistent) the use of OpenBSD preprocessor macro testsKris Katterjohn
Prior to this commit, the testsuite was failing on OpenBSD. After this commit the testsuite runs fine on OpenBSD. It was previously decided to test for the OpenBSD macro (rather than __OpenBSD__, etc.) because OpenBSD forks seem to have the former macro defined. sys/param.h must be included for the OpenBSD macro definition; however, many files tested for the OpenBSD macro without having this header included. This commit includes sys/param.h in the files where the OpenBSD macro is used (and sys/param.h is not already included), and it also changes some instances of the __OpenBSD__ macro to OpenBSD. See commit 27df23abb675ffeb198bf0c1cc85c4baed77a988 which changed everything to use OpenBSD instead of __OpenBSD__ or OPENBSD. See also tickets #6982 and #20980 (the latter ticket is where it was decided to use the OpenBSD macro). Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2018-11-09Rename subsystem callback functions to make them consistentNick Mathewson
2018-11-09fixup! Make initialization for the "err" library into a subsystem.Nick Mathewson
Check for failure to install backtrace handler.
2018-11-05Make initialization for the "err" library into a subsystem.Nick Mathewson
2018-07-03Refrain from potentially insecure usage of strncat()rl1987
2018-07-01File-level documentation for some of src/lib.Nick Mathewson
2018-06-25Include stdio.h in torerr.c.Nick Mathewson
2018-06-21New script to check includes for modularity violationsNick Mathewson
Includes configuration files to enforce these rules on lib and common. Of course, "common" *is* a modularity violation right now, so these rules aren't as strict as I would like them to be.
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Make sure liberr-testing is build with testing flags.Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Extract error functionality into a new lowest-level library.Nick Mathewson