1. 15 Dec, 2015 1 commit
    • cypherpunks's avatar
      Fix backtrace compilation on FreeBSD · 07cca627
      cypherpunks authored and Nick Mathewson's avatar Nick Mathewson committed
      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
      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.
  2. 02 Jan, 2015 1 commit
  3. 28 Oct, 2014 1 commit
  4. 17 Apr, 2014 1 commit
  5. 10 Apr, 2014 1 commit
    • Nick Mathewson's avatar
      Log a backtrace when the sandbox finds a failure · cc9e86db
      Nick Mathewson authored
      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.
  6. 18 Nov, 2013 3 commits
    • Nick Mathewson's avatar
      Make backtrace handler handle signals correctly. · d631ddfb
      Nick Mathewson authored
      This meant moving a fair bit of code around, and writing a signal
      cleanup function.  Still pretty nice from what I can tell, though.
    • Nick Mathewson's avatar
      Add a sighandler-safe logging mechanism · bd8ad674
      Nick Mathewson authored
      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.
    • Nick Mathewson's avatar
      Basic backtrace ability · 063bea58
      Nick Mathewson authored
      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.