aboutsummaryrefslogtreecommitdiff
path: root/src/common/backtrace.c
AgeCommit message (Collapse)Author
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-03-15Run the copyright update script.Nick Mathewson
2017-02-03Use the standard OpenBSD preprocessor definitioncypherpunks
2016-09-06checkSpace.pl now forbids more identifiers.Nick Mathewson
The functions it warns about are: assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc, strdup, strndup, calloc. Also, fix a few lingering instances of these in the code. Use other conventions to indicate _intended_ use of assert and malloc/realloc/etc.
2016-06-20More coverage in backtrace.cNick Mathewson
2016-06-17Use the Autoconf macro AC_USE_SYSTEM_EXTENSIONScypherpunks
The Autoconf macro AC_USE_SYSTEM_EXTENSIONS defines preprocessor macros which turn on extensions to C and POSIX. The macro also makes it easier for developers to use the extensions without needing (or forgetting) to define them manually. The macro can be safely used because it was introduced in Autoconf 2.60 and Tor requires Autoconf 2.63 and above.
2016-02-28clean/extend some module docs, including fix from #18403Nick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Add a brief file-level description for everything in src/commonNick Mathewson
2015-12-18Remove an extra space in backtrace version stringcypherpunks
2015-12-16... and fix the linux backtrace_symbols{,_fd} callsNick Mathewson
2015-12-15Fix backtrace compilation on FreeBSDcypherpunks
On FreeBSD backtrace(3) uses size_t instead of int (as glibc does). This causes integer precision loss errors when we used int to store its results. The issue is fixed by using size_t to store the results of backtrace(3). The manual page of glibc does not mention that backtrace(3) returns negative values. Therefore, no unsigned integer wrapping occurs when its result is stored in an unsigned data type.
2015-02-23Merge remote-tracking branch 'public/bug14988_025'Nick Mathewson
2015-02-23add another unused-var marker in backtrace.c for 14988Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-04-10Log a backtrace when the sandbox finds a failureNick Mathewson
This involves some duplicate code between backtrace.c and sandbox.c, but I don't see a way around it: calling more functions would mean adding more steps to our call stack, and running clean_backtrace() against the wrong point on the stack.
2014-02-25Trivial comment fix.Nick Mathewson
2014-02-24Threadproof our log_backtrace implementationNick Mathewson
It's possible for two threads to hit assertion failures at the same time. If that happens, let's keep them from stomping on the same cb_buf field. Fixes bug 11048; bugfix on 0.2.5.2-alpha. Reported by "cypherpunks".
2013-11-18Add a _GNU_SOURCE definition to backtrace.c to fix compilationNick Mathewson
2013-11-18Whoops -- add missing defined().Nick Mathewson
2013-11-18Make header includes match declarations in pc_from_ucontext.m4Nick Mathewson
With any luck, this will clean up errors where we detect that REG_{EIP,RIP} is present in autoconf, but when we go to include it, it isn't there.
2013-11-18Reseolve DOCDOC and XXXXs in backtrace.cNick Mathewson
2013-11-18Make backtrace handler handle signals correctly.Nick Mathewson
This meant moving a fair bit of code around, and writing a signal cleanup function. Still pretty nice from what I can tell, though.
2013-11-18Add a sighandler-safe logging mechanismNick Mathewson
We had accidentially grown two fake ones: one for backtrace.c, and one for sandbox.c. Let's do this properly instead. Now, when we configure logs, we keep track of fds that should get told about bad stuff happening from signal handlers. There's another entry point for these that avoids using non-signal-handler-safe functions.
2013-11-18Basic backtrace abilityNick Mathewson
On platforms with the backtrace/backtrace_symbols_fd interface, Tor can now dump stack traces on assertion failure. By default, I log them to DataDir/stack_dump and to stderr.