aboutsummaryrefslogtreecommitdiff
path: root/src/lib/err
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-03-26Add a SUBSYS_DECLARE_LOCATION() to every subsystem.Nick Mathewson
2020-02-13Run "make autostyle"teor
But only take the changes that were caused by the rest of the 33087 branch. Part of 33087.
2020-02-13err/log: Stop closing stderr and stdout during shutdownteor
Closing these file descriptors can hide sanitiser logs. Instead, flush the logs before tor exits, using fsync(). Some Windows environments don't have fsync(), so we check for it at compile time. Fixes bug 33087; bugfix on 0.4.1.6.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Replace several C identifiers.teor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ EXPOSE_CLEAN_BACKTRACE BACKTRACE_PRIVATE \ TOR_CHANNEL_INTERNAL_ CHANNEL_OBJECT_PRIVATE \ CHANNEL_PRIVATE_ CHANNEL_FILE_PRIVATE \ EXPOSE_ROUTERDESC_TOKEN_TABLE ROUTERDESC_TOKEN_TABLE_PRIVATE \ SCHEDULER_PRIVATE_ SCHEDULER_PRIVATE
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04doxygen: Take "lib" descriptions from doc/HACKING/design.Nick Mathewson
This commit takes descriptions for src/lib and moves them into our doxygen hierarchy. I've covered everything from lib/cc through lib/sandbox here.
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
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